provide check for authenticated on base view; minor CSS improvements
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3338 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
c5d872df6c
commit
647ed44cee
4 changed files with 9 additions and 4 deletions
|
@ -37,7 +37,8 @@
|
||||||
</metal:content>
|
</metal:content>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="sub-section" metal:define-macro="sub-section">
|
<div id="sub-section"
|
||||||
|
tal:condition="view/isAuthenticated">
|
||||||
<tal:portlet repeat="macro controller/macros/portlet_right">
|
<tal:portlet repeat="macro controller/macros/portlet_right">
|
||||||
<metal:portlet use-macro="macro" />
|
<metal:portlet use-macro="macro" />
|
||||||
</tal:portlet>
|
</tal:portlet>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
margin: 4em;
|
margin: 4em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top, #header, #menu, #sub-section, #footer, .object-actions {
|
.top, #header, #menu, #sub-section, #footer, .object-actions, .button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.top, #header, #menu, #sub-section, #footer, .object-actions {
|
.top, #header, #menu, #sub-section, #footer, .object-actions, .button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,4 +11,3 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: Black;
|
color: Black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ from zope.interface import Interface, implements
|
||||||
from zope.cachedescriptors.property import Lazy
|
from zope.cachedescriptors.property import Lazy
|
||||||
from zope.publisher.interfaces.browser import IBrowserSkinType
|
from zope.publisher.interfaces.browser import IBrowserSkinType
|
||||||
from zope.app.pagetemplate import ViewPageTemplateFile
|
from zope.app.pagetemplate import ViewPageTemplateFile
|
||||||
|
from zope.app.security.interfaces import IUnauthenticatedPrincipal
|
||||||
|
|
||||||
|
|
||||||
mainTemplate = ViewPageTemplateFile('main.pt')
|
mainTemplate = ViewPageTemplateFile('main.pt')
|
||||||
|
@ -84,6 +85,10 @@ class GenericView(object):
|
||||||
# this is useful for a top-level page only
|
# this is useful for a top-level page only
|
||||||
return self.index(*args, **kw)
|
return self.index(*args, **kw)
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def isAuthenticated(self):
|
||||||
|
return not IUnauthenticatedPrincipal.providedBy(self.request.principal)
|
||||||
|
|
||||||
def setupSubviews(self):
|
def setupSubviews(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue