diff --git a/src/doc/gallery/curator_permissions.py b/src/doc/gallery/curator_permissions.py index 7c2ccad99175edffa87ff07f30d9e844c83e0891..16b4b7f6f1bb9abfb7e191c6a1101181984bce9a 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)