rbac.delete_related_rbac_rules_tf
This commit is contained in:
parent
d1c8c30d8b
commit
88a8d1ed84
@ -142,8 +142,9 @@ end; $$;
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Deletes related rbac.object for use in the BEFORE DELETE TRIGGERs on the business objects.
|
Deletes related rbac.object for use in the BEFORE DELETE TRIGGERs on the business objects.
|
||||||
|
Through cascades all related rbac roles and grants are going to be deleted as well.
|
||||||
*/
|
*/
|
||||||
create or replace function deleteRelatedRbacObject()
|
create or replace function rbac.delete_related_rbac_rules_tf()
|
||||||
returns trigger
|
returns trigger
|
||||||
language plpgsql
|
language plpgsql
|
||||||
strict as $$
|
strict as $$
|
||||||
|
@ -20,11 +20,11 @@ begin
|
|||||||
execute createInsertTriggerSQL;
|
execute createInsertTriggerSQL;
|
||||||
|
|
||||||
createDeleteTriggerSQL = format($sql$
|
createDeleteTriggerSQL = format($sql$
|
||||||
create trigger deleteRbacRulesFor_%s_Trigger
|
create trigger delete_related_rbac_rules_for_%s_tg
|
||||||
after delete
|
after delete
|
||||||
on %s
|
on %s
|
||||||
for each row
|
for each row
|
||||||
execute procedure deleteRelatedRbacObject();
|
execute procedure rbac.delete_related_rbac_rules_tf();
|
||||||
$sql$, targetTable, targetTable);
|
$sql$, targetTable, targetTable);
|
||||||
execute createDeleteTriggerSQL;
|
execute createDeleteTriggerSQL;
|
||||||
end; $$;
|
end; $$;
|
||||||
|
Loading…
Reference in New Issue
Block a user