Can't make user admin, reverts when logging in

(Denis Heraud) #1

Hello everyone!

I’m trying to make a user an admin, I have tried going to admin/users/ and clicking on the Grant Admin and Grant Moderator buttons. If I go back to my user list, I can see that the user was granted those rights. However, as soon as the user logs in, the access is automatically revoked and reverts back to a regular user. I have also tried logging in via SSH and granting admin access to the user manually, butI get the same result where the user logs in and is reverted back to regular user rights…

What is going on here?

(David Taylor) #2

Are you using SSO? Or just the standard Discourse login system?

(Denis Heraud) #3

We are using SSO, yes.

(Rafael dos Santos Silva) #4

Enable verbose SSO logs in settings. I believe that your SSO payload is sending admin: false and revoking the rights of the user.

(Denis Heraud) #5

Thanks Rafael, I’m checking the logs now. How would I fix this issue assuming that that is indeed what is happening?

(Rafael dos Santos Silva) #6

Like Jeff said:

You will need to add admin: true for this user SSO payload.

(Denis Heraud) #7

Haha, yes I realize that, I’m just not sure how to go about it. :slight_smile: And you were right, the SSO log shows:

admin: false
moderator: false

So the question is, how would I pass on a parameter to a specific user’s SSO payload? I have never done that before.

(Rafael dos Santos Silva) #9

You already do that!

If user A comes in, you respond with for email and when user B comes you respond with Your SSO payload is already diferent for each user.

Something that is probably easier, is dropping both moderator and admin from the payload altogether and manage this only trough Discourse. I believe that it will work, too.