Compare commits
No commits in common. "74a3f9210be0f7dfd22111f4e139d624a59a2353" and "22efffa11b7261d1f6ad52285a426c154dff1f5e" have entirely different histories.
74a3f9210b
...
22efffa11b
4 changed files with 1 additions and 19 deletions
|
@ -33,6 +33,7 @@
|
|||
<include package="zope.app.form.browser" />
|
||||
<include package="zope.app.basicskin" />
|
||||
<include package="zope.browsermenu" />
|
||||
<include package="zope.principalregistry" />
|
||||
<include package="zope.authentication" />
|
||||
<include package="zope.securitypolicy" />
|
||||
<include package="zope.login" />
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
# loops.server.auth
|
||||
|
||||
# provide (register) authentication utility
|
||||
# and other authentication and authorization stuff.
|
||||
|
||||
from scopes.server import auth
|
||||
from zope.authentication.interfaces import IAuthentication
|
||||
from zope.component import getUtility, provideUtility
|
||||
|
||||
def registerAuthUtility():
|
||||
baseAuth = getUtility(IAuthentication)
|
||||
print('*** registerAuthUtility, baseAuth:', baseAuth)
|
||||
provideUtility(auth.JwtAuthentication(baseAuth))
|
||||
|
|
@ -5,11 +5,9 @@
|
|||
import sys
|
||||
|
||||
# module aliases - should be moved to loops.server.aliases
|
||||
# or removed after migration with zodbupdate
|
||||
from zope.securitypolicy import securitymap
|
||||
sys.modules['zope.app.securitypolicy.securitymap'] = securitymap
|
||||
|
||||
from loops.server import auth
|
||||
import waitress
|
||||
from zope.app.wsgi import config, getWSGIApplication
|
||||
|
||||
|
@ -23,7 +21,6 @@ def main():
|
|||
zope_conf = getattr(config, 'zope_conf', 'zope.conf')
|
||||
print(f'starting loops server... - conf: {zope_conf}')
|
||||
app = getWSGIApplication(zope_conf)
|
||||
auth.registerAuthUtility()
|
||||
run(app, config)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -31,7 +31,6 @@ from zope.security.management import getInteraction, newInteraction, endInteract
|
|||
from cybertools.util.date import date2TimeStamp, strptime
|
||||
from cybertools.util.jeep import Jeep
|
||||
from loops.common import adapted, baseObject
|
||||
from loops.server import auth
|
||||
from loops.util import getObjectForUid, getUidForObject, getCatalog, reindex
|
||||
|
||||
os.environ['NLS_LANG'] = 'German_Germany.UTF8'
|
||||
|
@ -68,7 +67,6 @@ def setup(zope_conf=None, loopsRootPath=None, config=config):
|
|||
if conn is None:
|
||||
print(f'opening ZODB connection...')
|
||||
conn = db.open()
|
||||
auth.registerAuthUtility()
|
||||
root = conn.root()['Application']
|
||||
setSite(root)
|
||||
sm = component.getSiteManager(root)
|
||||
|
|
Loading…
Add table
Reference in a new issue