diff --git a/dsp_permissions_scripts/ap/ap_model.py b/dsp_permissions_scripts/ap/ap_model.py index 6bda0d6a..4918521d 100644 --- a/dsp_permissions_scripts/ap/ap_model.py +++ b/dsp_permissions_scripts/ap/ap_model.py @@ -16,8 +16,6 @@ class ApValue(Enum): ProjectAdminGroupRestrictedPermission = "ProjectAdminGroupRestrictedPermission" # is allowed to change the permissions on all objects belonging to the project ProjectAdminRightsAllPermission = "ProjectAdminRightsAllPermission" - # is allowed to administrate the project ontologies - ProjectAdminOntologyAllPermission = "ProjectAdminOntologyAllPermission" class Ap(BaseModel): diff --git a/dsp_permissions_scripts/template.py b/dsp_permissions_scripts/template.py index 13d0919b..3540eb33 100644 --- a/dsp_permissions_scripts/template.py +++ b/dsp_permissions_scripts/template.py @@ -23,8 +23,8 @@ def modify_aps(aps: list[Ap]) -> list[Ap]: modified_aps = [] for ap in aps: if ap.forGroup == builtin_groups.PROJECT_MEMBER: - if ApValue.ProjectAdminOntologyAllPermission not in ap.hasPermissions: - ap.add_permission(ApValue.ProjectAdminOntologyAllPermission) + if ApValue.ProjectAdminGroupAllPermission not in ap.hasPermissions: + ap.add_permission(ApValue.ProjectAdminGroupAllPermission) modified_aps.append(ap) return modified_aps diff --git a/tests/test_ap.py b/tests/test_ap.py index b23fbedd..1bb85dfe 100644 --- a/tests/test_ap.py +++ b/tests/test_ap.py @@ -26,4 +26,4 @@ def test_remove_permission(self): def test_remove_permission_not_exists(self): with self.assertRaises(ValueError): - self.ap.remove_permission(ApValue.ProjectAdminOntologyAllPermission) + self.ap.remove_permission(ApValue.ProjectAdminAllPermission)