cesium-ml / baselayer

Fully customizable (scientific, compute-intensive) web application template
http://cesium-ml.org/baselayer/
31 stars 18 forks source link

Simplify access controls for system admins #225

Closed kmshin1397 closed 3 years ago

kmshin1397 commented 3 years ago

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.