Changeset 6589 for main


Ignore:
Timestamp:
10 Aug 2011, 22:01:08 (13 years ago)
Author:
Henrik Bettermann
Message:

Catch traceback if no user exists but 'Add local role' is accidentally clicked.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r6512 r6589  
    4848    form = view.request.form
    4949    localrole = form['local_role']
    50     user = form['user']
     50    if form.has_key('user'):
     51        user = form['user']
     52    else:
     53        view.flash('No user selected.')
     54        view.redirect(view.url(view.context, '@@manage')+'#tab-%s' % tab)
     55        return
    5156    role_manager = IPrincipalRoleManager(view.context)
    5257    role_manager.assignRoleToPrincipal(localrole, user)
Note: See TracChangeset for help on using the changeset viewer.