Mercurial > p > roundup > code
diff roundup/cgi/actions.py @ 4329:58b7ba47af87
fixes to make registration work again
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 29 Jan 2010 05:46:59 +0000 |
| parents | 8e0d350ce644 |
| children | 1aef7a4e4e39 |
line wrap: on
line diff
--- a/roundup/cgi/actions.py Fri Jan 29 05:29:49 2010 +0000 +++ b/roundup/cgi/actions.py Fri Jan 29 05:46:59 2010 +0000 @@ -840,12 +840,6 @@ % str(message)) return - # registration isn't allowed to supply roles - user_props = props[('user', None)] - if user_props.has_key('roles'): - raise exceptions.Unauthorised, self._( - "It is not permitted to supply roles at registration.") - # skip the confirmation step? if self.db.config['INSTANT_REGISTRATION']: # handle the create now @@ -923,6 +917,17 @@ # redirect to the "you're almost there" page raise exceptions.Redirect, '%suser?@template=rego_progress'%self.base + def newItemPermission(self, props, classname=None): + """Just check the "Register" permission. + """ + # registration isn't allowed to supply roles + if props.has_key('roles'): + raise exceptions.Unauthorised, self._( + "It is not permitted to supply roles at registration.") + + # technically already checked, but here for clarity + return self.hasPermission('Register', classname=classname) + class LogoutAction(Action): def handle(self): """Make us really anonymous - nuke the session too."""
