Update usage queries to reference auditlog.UserAuditEvent#255
Update usage queries to reference auditlog.UserAuditEvent#255labkey-adam merged 1 commit intodevelopfrom
Conversation
labkey-tchad
left a comment
There was a problem hiding this comment.
There's another one in WNPRC_EHR
|
@labkey-adam and/or @labkey-jeckels: do you know if this new query can be read by non-admin users? I do not recall if this specific use-case can be exercised by non-admins. However, this was historically a problem for user-facing things that tried to use the audit log. |
nevermind, this change is simpler than I initially thought. I think my question is still valid, but if there was a pre-existing problem, this wouldnt change it one way or another. |
Correct, the old query was simply a union of all the event queries, meant to mimic the really old single table that held all events, so perms have not changed. Also note that the "new" queries are 13 years old. Only admins and those explicitly assigned the "See Audit Log Events" role can read the audit log tables. |
Rationale
EHR tests have been failing after the deprecation of the legacy "audit union" table because these usage queries still use it. Switching them to query the provisioned UserAuditEvent table directly is more straightforward and likely more efficient.
Related Pull Requests