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

[FIX] respect Accounts_Registration_Users_Default_Roles setting #24173

Merged
merged 14 commits into from
Feb 18, 2022

Conversation

debdutdeb
Copy link
Member

@debdutdeb debdutdeb commented Jan 13, 2022

Signed-off-by: Debdut Chakraborty debdut.chakraborty@rocket.chat

Proposed changes (including videos or screenshots)

  • Fix user role being added as default regardless of the Accounts_Registration_Users_Default_Roles setting.

Issue(s)

closes #24148

Steps to test or reproduce

  1. As an admin, go to Administration > Accounts > Registration > Default Roles for Users and change it to admin;
  2. Register a new account;
  3. Check if the new account has the admin role. The new account should not have the user role.

Signed-off-by: Debdut Chakraborty <debdut.chakraborty@rocket.chat>
@debdutdeb debdutdeb changed the title [FIX] respect `Accounts_Registration_Users_Default_Roles [FIX] respect Accounts_Registration_Users_Default_Roles setting Jan 13, 2022
@ankar84
Copy link

ankar84 commented Jan 14, 2022

We merge that and tested - it works perfect - new registered user gets only roles from list, and no user role!
Thank you, @debdutdeb
Wait it to be merged in main codebase!

@ankar84
Copy link

ankar84 commented Jan 25, 2022

Hope that PR will land to 4.4.0 release!
@sampaiodiego please consider to merge it.

* Create findOneByRolesAndType function and stop adding user role by default

* Remove logs

* Remove default user role in userHandler.js
@debdutdeb debdutdeb requested a review from ostjen February 12, 2022 06:47
ostjen
ostjen previously approved these changes Feb 15, 2022
Co-authored-by: Debdut Chakraborty <debdut.chakraborty@rocket.chat>
@matheusbsilva137 matheusbsilva137 added this to the 4.5.0 milestone Feb 18, 2022
@matheusbsilva137 matheusbsilva137 merged commit a6a04cb into develop Feb 18, 2022
@matheusbsilva137 matheusbsilva137 deleted the fix/24148-respect-default-role-setting branch February 18, 2022 19:57
@pierre-lehnen-rc pierre-lehnen-rc mentioned this pull request Mar 1, 2022
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.

Role user assign to registered users despite of Default Roles for Users settings
4 participants