conditional RBAC update for debitor

This commit is contained in:
Michael Hoennig 2024-03-20 10:06:45 +01:00
parent bb3f979273
commit d62fcd45cf

View File

@ -113,9 +113,11 @@ declare
newRefundBankAccount hs_office_bankaccount;
begin
delete from rbacgrants g where g.grantedbytriggerof = OLD.uuid;
call buildRbacSystemForHsOfficeDebitor(NEW);
if NEW.refundbankaccountuuid <> OLD.refundbankaccountuuid
or NEW.debitorreluuid <> OLD.debitorreluuid then
delete from rbacgrants g where g.grantedbytriggerof = OLD.uuid;
call buildRbacSystemForHsOfficeDebitor(NEW);
end if;
end; $$;
/*