Changeset 1045

Show
Ignore:
Timestamp:
07/19/06 22:54:21 (2 years ago)
Author:
mgood
Message:

AccountManagerPlugin:

disallow registration of accounts which have existing permissions (fixes #155)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • accountmanagerplugin/0.9/acct_mgr/web_ui.py

    r1044 r1045  
    131131            return 
    132132 
     133        # disallow registration of accounts which have existing permissions 
     134        permission_system = perm.PermissionSystem(self.env) 
     135        if permission_system.get_user_permissions(user) != \ 
     136           permission_system.get_user_permissions('authenticated'): 
     137            req.hdf['registration.error'] = \ 
     138                'Another account with that name already exists.' 
     139            return 
     140 
    133141        password = req.args.get('password') 
    134142        if not password: 
  • accountmanagerplugin/trunk/acct_mgr/web_ui.py

    r1043 r1045  
    131131            return 
    132132 
     133        # disallow registration of accounts which have existing permissions 
     134        permission_system = perm.PermissionSystem(self.env) 
     135        if permission_system.get_user_permissions(user) != \ 
     136           permission_system.get_user_permissions('authenticated'): 
     137            req.hdf['registration.error'] = \ 
     138                'Another account with that name already exists.' 
     139            return 
     140 
    133141        password = req.args.get('password') 
    134142        if not password: