[rql, integrity] let ValidationError and Unauthorized pass during composite deletion (closes #2070042)
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Thu, 03 Nov 2011 16:01:41 +0100
changeset 8051 41398fa1a90f
parent 8050 0f3a54c37b05
child 8054 11b6589352b6
[rql, integrity] let ValidationError and Unauthorized pass during composite deletion (closes #2070042)
server/repository.py
--- a/server/repository.py	Fri Oct 28 17:54:24 2011 +0200
+++ b/server/repository.py	Thu Nov 03 16:01:41 2011 +0100
@@ -1213,6 +1213,13 @@
                     rql += ', NOT (Y cw_source S, S eid %(seid)s)'
                 try:
                     session.execute(rql, {'seid': scleanup}, build_descr=False)
+                except ValidationError:
+                    raise
+                except Unauthorized:
+                    self.exception('Unauthorized exception while cascading delete for entity %s '
+                                   'from %s. RQL: %s.\nThis should not happen since security is disabled here.',
+                                   entities, sourceuri, rql)
+                    raise
                 except Exception:
                     if self.config.mode == 'test':
                         raise