From 27fbb2b88f3a62189e8fdad29674c3cc6479d519 Mon Sep 17 00:00:00 2001 From: florian <f.spreckelsen@inidscale.com> Date: Fri, 5 Aug 2022 14:28:57 +0200 Subject: [PATCH] DOC: Add some explanatory comments to curator permissions script --- src/doc/gallery/curator_permissions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/doc/gallery/curator_permissions.py b/src/doc/gallery/curator_permissions.py index 7c2ccad9..16b4b7f6 100644 --- a/src/doc/gallery/curator_permissions.py +++ b/src/doc/gallery/curator_permissions.py @@ -74,12 +74,16 @@ def main(): "USE:*", ] + # Iterate over all entities defined in the schemas and update their access control list (ACL) accordingly. updates = db.Container() for model in [dataspace_definitions, dataset_definitions]: for ent in model.values(): if ent.name in [u.name for u in updates]: + # Skip entities that have been updated already continue + # The entity needs to be retrieved with the ACL flag to update the + # ACL down the road ent.retrieve(flags={"ACL": None}) for d in core_model_deny_permissions: ent.deny(role=CURATOR, priority=True, permission=d) -- GitLab