fix
This commit is contained in:
parent
e451668ff9
commit
0438cbb509
|
@ -39,7 +39,7 @@ def exists_nonce(nonce, req):
|
|||
|
||||
def generate_user_info(user, scope):
|
||||
if 'rols' in scope:
|
||||
rols = user.get_rols_dlt()
|
||||
rols = user.rols_dlt and user.get_rols_dlt() or []
|
||||
return UserInfo(rols=rols, sub=str(user.id), name=user.email)
|
||||
return UserInfo(sub=str(user.id), name=user.email)
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ class AllowCodeView(GenericMixin):
|
|||
|
||||
msg = requests.get(url, headers=headers)
|
||||
self.userinfo = json.loads(msg.text)
|
||||
rols = self.userinfo.get('rols', self.userinfo)
|
||||
rols = self.userinfo.get('rols', [])
|
||||
session['rols'] = [(k, k) for k in rols]
|
||||
return self.userinfo
|
||||
|
||||
|
|
Reference in a new issue