This PR simplifies the permissions querying for system admins for the baselayer-provided permission rule classes. Specifically, all rows are just returned if the user is a system admin without doing any of the normal checks when using the AccessibleIfRelatedRowsAreAccessible and ComposedAccessControl classes. This reflects the same approach already used in AccessibleIfUserMatches.
For example, if you have a rule that is the AND of two rules, the ComposedAccessControl as is will join the entire table in question to itself since both pieces of the permission rule will return all rows for a system admin. Now, we'll just return the table once.
This PR simplifies the permissions querying for system admins for the baselayer-provided permission rule classes. Specifically, all rows are just returned if the user is a system admin without doing any of the normal checks when using the
AccessibleIfRelatedRowsAreAccessible
andComposedAccessControl
classes. This reflects the same approach already used inAccessibleIfUserMatches
.For example, if you have a rule that is the AND of two rules, the
ComposedAccessControl
as is will join the entire table in question to itself since both pieces of the permission rule will return all rows for a system admin. Now, we'll just return the table once.