equal
deleted
inserted
replaced
106 with hooks_control(self.session, self.session.HOOKS_ALLOW_ALL, 'integrity'): |
106 with hooks_control(self.session, self.session.HOOKS_ALLOW_ALL, 'integrity'): |
107 # ... do stuff with all but 'integrity' hooks activated |
107 # ... do stuff with all but 'integrity' hooks activated |
108 |
108 |
109 with hooks_control(self.session, self.session.HOOKS_DENY_ALL, 'integrity'): |
109 with hooks_control(self.session, self.session.HOOKS_DENY_ALL, 'integrity'): |
110 # ... do stuff with none but 'integrity' hooks activated |
110 # ... do stuff with none but 'integrity' hooks activated |
|
111 |
|
112 This is an internal api, you should rather use |
|
113 :meth:`~cubicweb.server.session.Session.deny_all_hooks_but` or |
|
114 :meth:`~cubicweb.server.session.Session.allow_all_hooks_but` session |
|
115 methods. |
111 """ |
116 """ |
112 def __init__(self, session, mode, *categories): |
117 def __init__(self, session, mode, *categories): |
113 self.session = session |
118 self.session = session |
114 self.mode = mode |
119 self.mode = mode |
115 self.categories = categories |
120 self.categories = categories |
215 `HOOKS_ALLOW_ALL`, this set contains hooks categories that are disabled. |
220 `HOOKS_ALLOW_ALL`, this set contains hooks categories that are disabled. |
216 |
221 |
217 |
222 |
218 :attr:`running_dbapi_query`, boolean flag telling if the executing query |
223 :attr:`running_dbapi_query`, boolean flag telling if the executing query |
219 is coming from a dbapi connection or is a query from within the repository |
224 is coming from a dbapi connection or is a query from within the repository |
|
225 |
|
226 .. automethod:: cubicweb.server.session.deny_all_hooks_but |
|
227 .. automethod:: cubicweb.server.session.all_all_hooks_but |
220 """ |
228 """ |
221 is_request = False |
229 is_request = False |
222 is_internal_session = False |
230 is_internal_session = False |
223 |
231 |
224 def __init__(self, user, repo, cnxprops=None, _id=None): |
232 def __init__(self, user, repo, cnxprops=None, _id=None): |