'Merge Roles from SSO' wipes all user roles from the existing user #17466
Labels
feat: oauth / sso
feat: roles / permissions
stat: stale
Stale issues will be automatically closed if no activity
type: bug
Description:
Since RC 3.1.x when
Merge Roles from SSO
is enabled, the Custom Oauth authentication wipes existing user roles from the user, if not defined in Oauth source or the Roles/Groups field of the configuration.The issue is meaningful because if the Oauth roles don't match with the existing roles, manually managed roles get wiped out. Instead of 'Merge', it now acts more like 'Replace'.
Steps to reproduce:
Roles/Groups field name
field empty.Merge Roles from SSO
is disabled.Merge Roles from SSO
in your custom Oauth config.Expected behavior:
All existing roles should stay intact in all use cases. New ones can be added if those are offered by the Oauth source and config allows this, but in this example neither provides them.
Actual behavior:
The user loses his existing 'User' role and any other additional roles. Losing the user role causes lots of issues for the user, for instance listing channels and users under the directory fails, and most of the channels get missing in the channel listing pane.
Server Setup Information:
Additional context
This behaviour did not exist yet in RC 3.0.12.
The issue may be related to what was tried to achieve in #14454.
The text was updated successfully, but these errors were encountered: