mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:50:00 +08:00
Add admin and moderator state to sso provider
This commit is contained in:
parent
f918d3e89b
commit
800ae5265f
|
@ -27,6 +27,8 @@ class SessionController < ApplicationController
|
|||
sso.username = current_user.username
|
||||
sso.email = current_user.email
|
||||
sso.external_id = current_user.id.to_s
|
||||
sso.admin = current_user.admin?
|
||||
sso.moderator = current_user.moderator?
|
||||
redirect_to sso.to_url(sso.return_sso_url)
|
||||
else
|
||||
session[:sso_payload] = request.query_string
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class SingleSignOn
|
||||
ACCESSORS = [:nonce, :name, :username, :email, :avatar_url, :avatar_force_update,
|
||||
:about_me, :external_id, :return_sso_url]
|
||||
:about_me, :external_id, :return_sso_url, :admin, :moderator]
|
||||
FIXNUMS = []
|
||||
NONCE_EXPIRY_TIME = 10.minutes
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user