[book] replace PropagateSubjectRelation*Hook references
authorSamuel Trégouët <samuel.tregouet@logilab.fr>
Fri, 10 Jan 2014 15:02:19 +0100
changeset 9391 5537c3b64841
parent 9390 41795de3d48a
child 9392 dd88d86d780a
[book] replace PropagateSubjectRelation*Hook references PropagateSubjectRelationHook, PropagateSubjectRelationAddHook and PropagateSubjectRelationDelHook were deprecated by PropagateRelationHook, PropagateRelationAddHook, PropagateRelationDelHook respectively in v3.9, and removed in 3.18. Closes #3420672
doc/book/en/tutorials/advanced/part02_security.rst
--- a/doc/book/en/tutorials/advanced/part02_security.rst	Thu Jan 09 16:16:34 2014 +0100
+++ b/doc/book/en/tutorials/advanced/part02_security.rst	Fri Jan 10 15:02:19 2014 +0100
@@ -259,26 +259,26 @@
     # relations where the "parent" entity is the object
     O_RELS = set(('filed_under', 'comments',))
 
-    class AddEntitySecurityPropagationHook(hook.PropagateSubjectRelationHook):
+    class AddEntitySecurityPropagationHook(hook.PropagateRelationHook):
 	"""propagate permissions when new entity are added"""
 	__regid__ = 'sytweb.addentity_security_propagation'
-	__select__ = (hook.PropagateSubjectRelationHook.__select__
+	__select__ = (hook.PropagateRelationHook.__select__
 		      & hook.match_rtype_sets(S_RELS, O_RELS))
 	main_rtype = 'may_be_read_by'
 	subject_relations = S_RELS
 	object_relations = O_RELS
 
-    class AddPermissionSecurityPropagationHook(hook.PropagateSubjectRelationAddHook):
+    class AddPermissionSecurityPropagationHook(hook.PropagateRelationAddHook):
 	"""propagate permissions when new entity are added"""
 	__regid__ = 'sytweb.addperm_security_propagation'
-	__select__ = (hook.PropagateSubjectRelationAddHook.__select__
+	__select__ = (hook.PropagateRelationAddHook.__select__
 		      & hook.match_rtype('may_be_read_by',))
 	subject_relations = S_RELS
 	object_relations = O_RELS
 
-    class DelPermissionSecurityPropagationHook(hook.PropagateSubjectRelationDelHook):
+    class DelPermissionSecurityPropagationHook(hook.PropagateRelationDelHook):
 	__regid__ = 'sytweb.delperm_security_propagation'
-	__select__ = (hook.PropagateSubjectRelationDelHook.__select__
+	__select__ = (hook.PropagateRelationDelHook.__select__
 		      & hook.match_rtype('may_be_read_by',))
 	subject_relations = S_RELS
 	object_relations = O_RELS