move login form (NodeView) to cco.member; + helper methods in NodeView

This commit is contained in:
Helmut Merz 2015-11-13 16:25:34 +01:00
parent babb222868
commit bd33c28d08
2 changed files with 7 additions and 4 deletions

View file

@ -34,10 +34,10 @@
<!-- login/logout -->
<page for="loops.interfaces.INode"
<!--<page for="loops.interfaces.INode"
name="login.html"
class="loops.browser.auth.LoginForm"
permission="zope.View" />
permission="zope.View" />-->
<page for="loops.interfaces.INode"
name="logout.html"

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2013 Helmut Merz helmutm@cy55.de
# Copyright (c) 2015 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
@ -422,8 +422,11 @@ class NodeView(BaseView):
@Lazy
def logoutUrl(self):
nextUrl = urllib.urlencode(dict(nextUrl=self.menu.url))
return 'logout.html?' + nextUrl
return '%s/logout.html?%s' % (self.menu.url, nextUrl)
@Lazy
def authenticationMethod(self):
return self.viewAnnotations.get('auth_method') or 'standard'
# virtual target support