Skip to content

Commit

Permalink
fix: remove SystemUser from built-in groups (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum authored Oct 7, 2023
1 parent 822c5ab commit bfbf9f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion dsp_permissions_scripts/models/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ class BuiltinGroup(Enum):
CREATOR = "http://www.knora.org/ontology/knora-admin#Creator"
PROJECT_MEMBER = "http://www.knora.org/ontology/knora-admin#ProjectMember"
PROJECT_ADMIN = "http://www.knora.org/ontology/knora-admin#ProjectAdmin"
SYSTEM_USER = "http://www.knora.org/ontology/knora-admin#SystemUser"
SYSTEM_ADMIN = "http://www.knora.org/ontology/knora-admin#SystemAdmin"
6 changes: 3 additions & 3 deletions tests/test_scope_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@

class TestScopeSerialization(unittest.TestCase):
perm_strings = [
"CR knora-admin:SystemUser|V knora-admin:CustomGroup",
"CR knora-admin:SystemAdmin|V knora-admin:CustomGroup",
"D knora-admin:ProjectAdmin|RV knora-admin:ProjectMember",
"M knora-admin:ProjectAdmin|V knora-admin:Creator,knora-admin:KnownUser|RV knora-admin:UnknownUser",
"CR knora-admin:SystemAdmin,knora-admin:ProjectAdmin|D knora-admin:Creator|RV knora-admin:UnknownUser",
]
admin_route_objects = [
[
{"name": "CR", "additionalInformation": "knora-admin:SystemUser", "permissionCode": None},
{"name": "CR", "additionalInformation": "knora-admin:SystemAdmin", "permissionCode": None},
{"name": "V", "additionalInformation": "knora-admin:CustomGroup", "permissionCode": None},
],
[
Expand All @@ -42,7 +42,7 @@ class TestScopeSerialization(unittest.TestCase):
]
scopes = [
PermissionScope(
CR=[BuiltinGroup.SYSTEM_USER],
CR=[BuiltinGroup.SYSTEM_ADMIN],
V=["http://www.knora.org/ontology/knora-admin#CustomGroup"],
),
PermissionScope(
Expand Down

0 comments on commit bfbf9f4

Please sign in to comment.