work in progress: make cybertools package work with BlueBream 1.0
This commit is contained in:
parent
f0e789d844
commit
b327062492
4 changed files with 6 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2006 Helmut Merz helmutm@cy55.de
|
||||
# Copyright (c) 2011 Helmut Merz helmutm@cy55.de
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -23,7 +23,6 @@ $Id$
|
|||
"""
|
||||
|
||||
import urllib
|
||||
from zope.app import zapi
|
||||
from zope.app.authentication.session import SessionCredentialsPlugin
|
||||
from zope.app.component import hooks
|
||||
from zope.app.i18n import ZopeMessageFactory as _
|
||||
|
@ -33,6 +32,7 @@ from zope.app.security.interfaces import ILogoutSupported
|
|||
from zope.cachedescriptors.property import Lazy
|
||||
from zope.i18n import translate
|
||||
from zope.publisher.interfaces.http import IHTTPRequest
|
||||
from zope.traversing.browser import absoluteURL
|
||||
|
||||
|
||||
class LoopsSessionCredentialsPlugin(SessionCredentialsPlugin):
|
||||
|
@ -49,7 +49,7 @@ class LoopsSessionCredentialsPlugin(SessionCredentialsPlugin):
|
|||
camefrom = request.getApplicationURL() + path
|
||||
if 'login' in camefrom:
|
||||
camefrom = '/'.join(camefrom.split('/')[:-1])
|
||||
url = '%s/@@%s?%s' % (zapi.absoluteURL(site, request),
|
||||
url = '%s/@@%s?%s' % (absoluteURL(site, request),
|
||||
self.loginpagename,
|
||||
urllib.urlencode({'camefrom': camefrom}))
|
||||
request.response.redirect(url)
|
||||
|
|
|
@ -61,13 +61,13 @@
|
|||
factory=".auth.LoopsSessionCredentialsPlugin"
|
||||
/>
|
||||
|
||||
<zope:localUtility class=".auth.LoopsSessionCredentialsPlugin">
|
||||
<zope:class class=".auth.LoopsSessionCredentialsPlugin">
|
||||
|
||||
<zope:require
|
||||
permission="zope.ManageServices"
|
||||
interface="zope.app.authentication.session.IBrowserFormChallenger"
|
||||
set_schema="zope.app.authentication.session.IBrowserFormChallenger" />
|
||||
|
||||
</zope:localUtility>
|
||||
</zope:class>
|
||||
|
||||
</configure>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
template="../ajax/innerHtml.pt"
|
||||
class="cybertools.container.base.ContainerView"
|
||||
permission="zope.ManageContent"
|
||||
menu="zmi_views" title="Contents"
|
||||
/>
|
||||
|
||||
</configure>
|
||||
|
|
1
setup.py
1
setup.py
|
@ -23,6 +23,7 @@ setup(name='cybertools',
|
|||
'PIL',
|
||||
'zope.app.catalog',
|
||||
'zope.app.file',
|
||||
'zope.app.preview',
|
||||
'zope.app.session',
|
||||
'zope.sendmail',
|
||||
],
|
||||
|
|
Loading…
Add table
Reference in a new issue