Changeset 6685 for main/waeup.sirp/trunk
- Timestamp:
- 6 Sep 2011, 08:12:13 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 3 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/authentication.txt
r6609 r6685 158 158 159 159 >>> browser.open('http://localhost/app') 160 >>> browser.getLink(' StaffLogin').click()160 >>> browser.getLink('Login').click() 161 161 >>> print browser.headers['Status'] 162 162 200 Ok … … 201 201 >>> print browser.contents 202 202 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 203 ... Staff Login203 ...Login</a></div> 204 204 ... 205 205 -
main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py
r6635 r6685 265 265 grok.view(Interface) 266 266 grok.order(2) 267 268 def isAuthenticated(self): 269 """Is the calling user authenticated? 270 """ 271 return self.request.principal.id != 'zope.anybody' 267 grok.require('waeup.Anonymous') 268 text = 'Login' 269 link = 'login' 270 271 def render(self): 272 if self.request.principal.id != 'zope.anybody': 273 return '' 274 url = self.view.url(grok.getSite(), self.link) 275 return u'<div class="portlet"><a href="%s">%s</a></div>' % ( 276 url, self.text) 277 272 278 273 279 class ManageLink(grok.Viewlet):
Note: See TracChangeset for help on using the changeset viewer.