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
| 10949 | // their base tables, since it's nonsense and causes weird |
| 10950 | // messages about false REFERENCES right failures. |
| 10951 | static 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. |
| 10970 | static void preModifyEraseTriggers(thread_db* tdbb, TrigVector** trigs, |
no test coverage detected