Users are not added to the moderators groups when registering with SSO

The issue is still there in version v1.6.0.beta4 +161 :sadpanda:

The same effect occurs if an existing user is given moderator privileges by another SSO sign-in.

After snooping around in the code, could this be because SSO simply sets the flag and saves the user…

https://github.com/discourse/discourse/blob/19ca08857fba1b74669af0568e1abe9932b84866/app/models/discourse_single_sign_on.rb#L76

…while the proper “grant moderation” action…

https://github.com/discourse/discourse/blob/be3a5a56ccc284b352aa65080fc6b955f73cc72a/app/models/concerns/roleable.rb#L20

…runs this refresh?

https://github.com/discourse/discourse/blob/be3a5a56ccc284b352aa65080fc6b955f73cc72a/app/models/concerns/roleable.rb#L38

3 Likes