auth: provide list of groups for principal on login callback
This commit is contained in:
parent
ebba53c823
commit
1e044e7aef
2 changed files with 10 additions and 1 deletions
|
@ -30,6 +30,14 @@ class CallbackView:
|
||||||
oidc.Authenticator(self.request).callback()
|
oidc.Authenticator(self.request).callback()
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
def getGroupsForPrincipal(self, prcId):
|
||||||
|
pau = getUtility(IAuthentication, context=self.context)
|
||||||
|
groups = pau['gloops'].getGroupsForPrincipal(prcId)
|
||||||
|
gf_ws = pau.get('gloops_ws')
|
||||||
|
if gf_ws:
|
||||||
|
groups += gf_ws.getGroupsForPrincipal(prcId)
|
||||||
|
return groups
|
||||||
|
|
||||||
|
|
||||||
class LogoutView:
|
class LogoutView:
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,8 @@
|
||||||
You are not authorized to perform this action. However, you may login as a
|
You are not authorized to perform this action. However, you may login as a
|
||||||
different user who is authorized.</p>
|
different user who is authorized.</p>
|
||||||
<p>
|
<p>
|
||||||
<a tal:attributes="href string:/auth_login?camefrom=$camefrom">Login with Zitadel</a>
|
<a tal:attributes="href string:/auth_login?camefrom=$camefrom"
|
||||||
|
i18n:translate="">Login with Zitadel</a>
|
||||||
</p>
|
</p>
|
||||||
<form action="." method="post"
|
<form action="." method="post"
|
||||||
tal:attributes="action request/URL">
|
tal:attributes="action request/URL">
|
||||||
|
|
Loading…
Add table
Reference in a new issue