- Timestamp:
- 18 May 2009, 08:22:57 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/authentication.py
r4129 r4135 38 38 39 39 class Login(grok.View): 40 """A general login page used in case of not found resources, etc. 41 """ 40 42 grok.context(IWAeUPObject) 41 43 # grok.require('zope.Public') # XXX: Does not work in ftests! … … 45 47 if SUBMIT is not None: 46 48 self.redirect(self.camefrom) 47 49 50 class LoginStaff(grok.View): 51 """A login page for staff members. 52 """ 53 grok.context(IWAeUPObject) 54 grok.template('login') 55 56 def update(self, SUBMIT=None): 57 if SUBMIT is None: 58 return 59 self.redirect(self.url(grok.getSite())) 60 61 class LoginStudent(grok.View): 62 """A login page for students. 63 """ 64 grok.context(IWAeUPObject) 65 grok.template('login') 66 67 def update(self, SUBMIT=None): 68 if SUBMIT is None: 69 return 70 self.redirect(self.url(grok.getSite())) 71 48 72 class LoginMain(grok.Viewlet): 49 73 grok.viewletmanager(MainArea) … … 51 75 grok.view(Login) 52 76 77 class LoginMainStaff(grok.Viewlet): 78 grok.viewletmanager(MainArea) 79 grok.context(IWAeUPObject) 80 grok.view(LoginStaff) 81 82 class LoginMainStudent(grok.Viewlet): 83 grok.viewletmanager(MainArea) 84 grok.context(IWAeUPObject) 85 grok.view(LoginStudent) 86 87 53 88 class Logout(grok.Viewlet): 54 89 grok.viewletmanager(LeftSidebar)
Note: See TracChangeset for help on using the changeset viewer.