Compare commits

...

2 commits

3 changed files with 15 additions and 1 deletions

View file

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

View file

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

View file

@ -11,6 +11,7 @@
import atexit import atexit
import os import os
import sys
from transaction import commit, abort from transaction import commit, abort
from zope.app import wsgi from zope.app import wsgi
from zope.app.authentication.principalfolder import Principal from zope.app.authentication.principalfolder import Principal
@ -26,6 +27,7 @@ from zope.interface import Interface
from zope.lifecycleevent import ObjectCreatedEvent, ObjectModifiedEvent from zope.lifecycleevent import ObjectCreatedEvent, ObjectModifiedEvent
from zope.publisher.browser import TestRequest as BaseTestRequest from zope.publisher.browser import TestRequest as BaseTestRequest
from zope.security.management import getInteraction, newInteraction, endInteraction from zope.security.management import getInteraction, newInteraction, endInteraction
from zope.site import site
#from zope.pluggableauth.plugins.principalfolder import PrincipalInfo #from zope.pluggableauth.plugins.principalfolder import PrincipalInfo
from cybertools.util.date import date2TimeStamp, strptime from cybertools.util.date import date2TimeStamp, strptime
@ -36,6 +38,9 @@ from loops.util import getObjectForUid, getUidForObject, getCatalog, reindex
os.environ['NLS_LANG'] = 'German_Germany.UTF8' os.environ['NLS_LANG'] = 'German_Germany.UTF8'
# hack for fixing error from migration (zope.app.component.SiteManagementFolder):
sys.modules['dummy'] = site
try: try:
import config import config
except ImportError: except ImportError: