Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give Site Administrator permission to add users to groups #1751

Merged
merged 2 commits into from
Feb 24, 2024

Conversation

wesleybl
Copy link
Member

The addMember method requires the user to have the Manage Users permission but the Site Administrator does not have this permission. Then we use the addPrincipalToGroup method, which does not require this permission.

fixes #1750

@mister-roboto
Copy link

@wesleybl thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

Copy link

netlify bot commented Feb 16, 2024

Deploy Preview for plone-restapi canceled.

Name Link
🔨 Latest commit cc46fe1
🔍 Latest deploy log https://app.netlify.com/sites/plone-restapi/deploys/65da408b32add90008f37588

@wesleybl
Copy link
Member Author

@jenkins-plone-org please run jobs

The addMember method requires the user to have the "Manage Users"
permission but the Site Administrator does not have this permission.
Then we use the addPrincipalToGroup method, which does not require this
permission.
@jensens
Copy link
Sponsor Member

jensens commented Feb 21, 2024

While this fixes the immediate problem, I would question question why the two methods have different permissions - and if it would not be better to fix it there than working around here?

@wesleybl
Copy link
Member Author

@jensens this is the same solution used in the Classic UI. See @davisagli 's opinion on using Manage Users:

#1712 (comment)

@jensens
Copy link
Sponsor Member

jensens commented Feb 21, 2024

@jensens this is the same solution used in the Classic UI. See @davisagli 's opinion on using Manage Users:

#1712 (comment)

got it, indeed.

Copy link
Sponsor Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

news/1750.bugfix Outdated Show resolved Hide resolved
@davisagli davisagli merged commit 1f97c6a into main Feb 24, 2024
21 of 25 checks passed
@davisagli davisagli deleted the site_adm_add_user_to_group branch February 24, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Site Administrator cannot add user to group
4 participants