Skip to content

Allow users with ManageUsers permission to edit local user's email addresses#6183

Open
danimo wants to merge 2 commits intobigbluebutton:masterfrom
danimo:feat/edit_email
Open

Allow users with ManageUsers permission to edit local user's email addresses#6183
danimo wants to merge 2 commits intobigbluebutton:masterfrom
danimo:feat/edit_email

Conversation

@danimo
Copy link
Contributor

@danimo danimo commented Jan 19, 2026

Cleaned up the logic in UsersController along the way.

@danimo danimo force-pushed the feat/edit_email branch 2 times, most recently from 77ec82f to d34f51b Compare January 21, 2026 17:06
@danimo
Copy link
Contributor Author

danimo commented Jan 21, 2026

I initially got the logic wrong during refactoring until I was alerted to it by gaja (tnx!). Please double-check before merging!

…dresses

Cleaned up the logic in UsersController along the way.
@jrsevenfour
Copy link

thumbs up!

@farhatahmad
Copy link
Collaborator

There's been some back and forth discussion here: #5593

I've always been of the idea that an admin can do whatever they want - so I think this is a good middle solution

return %i[password avatar language role_id invite_token] if external_auth? && !is_admin
permitted = %i[password avatar language role_id invite_token]
permitted.push(:name) if is_user_manager || !external_auth?
permitted.push(:email) if is_user_manager
Copy link
Collaborator

Choose a reason for hiding this comment

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

Allowing the admin to change an external users email might be problematic - especially if things aren't configured correctly

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd argue that this should be a local user thing but I imagine that's not what most people would need this for

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Allowing the admin to change an external users email might be problematic - especially if things aren't configured correctly

It depends a bit if email is the identifying key (or if the email fallback is activated). Anyway, if you feel like it is warranted, I can add a note in the documentation.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants