MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / postTriggerAccess

Function postTriggerAccess

src/dsql/StmtNodes.cpp:10951–10967  ·  view source on GitHub ↗

Inherit access to triggers to be fired. When we detect that a trigger could be fired by a request, then we add the access list for that trigger to the access list for this request. That way, when we check access for the request we also check access for any other objects that could be fired off by the request. Note that when we add the access item, we specify that Trigger X needs access to resou

Source from the content-addressed store, hash-verified

10949// their base tables, since it's nonsense and causes weird
10950// messages about false REFERENCES right failures.
10951static void postTriggerAccess(CompilerScratch* csb, jrd_rel* ownerRelation,
10952 ExternalAccess::exa_act operation, jrd_rel* view)
10953{
10954 DEV_BLKCHK(csb, type_csb);
10955 DEV_BLKCHK(view, type_rel);
10956
10957 // allow all access to internal requests
10958 if (csb->csb_g_flags & (csb_internal | csb_ignore_perm))
10959 return;
10960
10961 // Post trigger access
10962 ExternalAccess temp(operation, ownerRelation->rel_id, view ? view->rel_id : 0);
10963 FB_SIZE_T i;
10964
10965 if (!csb->csb_external.find(temp, i))
10966 csb->csb_external.insert(i, temp);
10967}
10968
10969// Perform operation's pre-triggers, storing active rpb in chain.
10970static void preModifyEraseTriggers(thread_db* tdbb, TrigVector** trigs,

Callers 3

pass1EraseMethod · 0.85
pass1ModifyMethod · 0.85
pass1StoreMethod · 0.85

Calls 2

findMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected