unsetIdOnDeactivation(role, event)

Documentation String

Unset the permission id up registration deactivation.

Let's see how this notifier can be used. First we need to create an event using the permission instance and a registration stub:

>>> class Registration:
...     def __init__(self, obj, name):
...         self.component = obj
... = name
>>> role1 = LocalRole('Role 1', 'A first role')
>>> = 'role1'
>>> import zope.component.interfaces
>>> event = zope.component.interfaces.Unregistered(
...     Registration(role1, 'role1'))

Now we pass the event into this function, and the id of the role should be set to NULL_ID.

>>> unsetIdOnDeactivation(role1, event)
u'<role not activated>'