Mercurial > p > roundup > code
diff templates/classic/detectors/userauditor.py @ 3711:20f63b6b806f
removing all roles now works (issue [SF#538758])
| author | Tobias Herp <tobias-herp@users.sourceforge.net> |
|---|---|
| date | Mon, 18 Sep 2006 03:24:38 +0000 |
| parents | 00f0267db956 |
| children | d6bab60f9ca4 |
line wrap: on
line diff
--- a/templates/classic/detectors/userauditor.py Mon Sep 18 01:29:33 2006 +0000 +++ b/templates/classic/detectors/userauditor.py Mon Sep 18 03:24:38 2006 +0000 @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -#$Id: userauditor.py,v 1.2 2003-11-11 22:25:37 richard Exp $ +#$Id: userauditor.py,v 1.3 2006-09-18 03:24:38 tobias-herp Exp $ def audit_user_fields(db, cl, nodeid, newvalues): ''' Make sure user properties are valid. @@ -29,7 +29,7 @@ if newvalues.has_key('address') and ' ' in newvalues['address']: raise ValueError, 'Email address must not contain spaces' - if newvalues.has_key('roles'): + if newvalues.has_key('roles') and newvalues['roles']: roles = [x.lower().strip() for x in newvalues['roles'].split(',')] for rolename in roles: if not db.security.role.has_key(rolename):
