Ignore:
Timestamp:
21 May 2011, 07:46:51 (13 years ago)
Author:
Henrik Bettermann
Message:

Implement changes in r6180 for academics section. There are some bugs, see email.

File:
1 edited

Legend:

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

    r6166 r6181  
    2323from zope.exceptions import DuplicationError
    2424from zope.session.interfaces import ISession
     25from zope.event import notify
    2526from waeup.sirp.browser.resources import warning, datepicker, tabs, datatable
    2627from waeup.sirp.browser import (
     
    4041from waeup.sirp.university.vocabularies import course_levels
    4142from waeup.sirp.widgets.restwidget import ReSTDisplayWidget
     43from waeup.sirp.users import LocalRoleSetEvent
    4244
    4345grok.context(IWAeUPObject)
     
    5052    role_manager = IPrincipalRoleManager(view.context)
    5153    role_manager.assignRoleToPrincipal(localrole, user)
     54    notify(LocalRoleSetEvent(view.context, localrole, user, granted=True))
     55    #import pdb; pdb.set_trace()
    5256    view.redirect(view.url(view.context, u'@@manage')+'#tab-%s' % tab)
    5357    return
     
    6367    if not isinstance(child_id, list):
    6468        child_id = [child_id]
    65     #import pdb; pdb.set_trace()
    6669    deleted = []
    6770    role_manager = IPrincipalRoleManager(view.context)
     
    7174        try:
    7275            role_manager.unsetRoleForPrincipal(localrole, user_name)
     76            notify(LocalRoleSetEvent(view.context, localrole, user_name, granted=False))
    7377            deleted.append(id)
    7478        except:
Note: See TracChangeset for help on using the changeset viewer.