This commit is contained in:
Cayo Puigdefabregas 2023-06-23 11:59:45 +02:00
parent e451668ff9
commit 0438cbb509
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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