Skip to content

Commit

Permalink
Test that the Site Administrator cannot add a Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleybl committed Sep 22, 2023
1 parent 950706a commit e5bc9b8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/plone/restapi/tests/test_services_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -1363,3 +1363,18 @@ def test_siteadm_not_delete_manager(self):
transaction.commit()

self.assertIsNotNone(api.user.get(userid="noam"))

def test_siteadm_not_add_manager(self):
self.set_siteadm()
self.api_session.post(
"/@users",
json={
"username": "howard",
"email": "[email protected]",
"password": "peopleshistory",
"roles": ["Manager"],
},
)
transaction.commit()

self.assertIsNone(api.user.get(userid="howard"))

0 comments on commit e5bc9b8

Please sign in to comment.