doc/book/en/tutorials/advanced/part02_security.rst
changeset 8190 2a3c1b787688
parent 7286 a0d3ea01f4bf
child 8483 4ba11607d84a
equal deleted inserted replaced
8189:2ee0ef069fa7 8190:2a3c1b787688
   185 
   185 
   186 Here is the code in cube's *hooks.py*:
   186 Here is the code in cube's *hooks.py*:
   187 
   187 
   188 .. sourcecode:: python
   188 .. sourcecode:: python
   189 
   189 
   190     from cubicweb.selectors import is_instance
   190     from cubicweb.predicates import is_instance
   191     from cubicweb.server import hook
   191     from cubicweb.server import hook
   192 
   192 
   193     class SetVisibilityOp(hook.DataOperationMixIn, hook.Operation):
   193     class SetVisibilityOp(hook.DataOperationMixIn, hook.Operation):
   194 
   194 
   195 	def precommit_event(self):
   195 	def precommit_event(self):