server/querier.py
changeset 8349 fdb796435d7b
parent 8342 7a5271182ef0
child 8542 7e264ce34cd4
--- a/server/querier.py	Thu Mar 29 14:20:41 2012 +0200
+++ b/server/querier.py	Tue Apr 10 17:03:19 2012 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -417,7 +417,7 @@
                         if rqlexpr.check(session, eid):
                             break
                     else:
-                        raise Unauthorized()
+                        raise Unauthorized('No read acces on %r with eid %i.' % (var, eid))
                 restricted_vars.update(localcheck)
                 localchecks.setdefault(tuple(localcheck.iteritems()), []).append(solution)
         # raise Unautorized exception if the user can't access to any solution
@@ -723,7 +723,7 @@
             rqlst = rqlst.copy()
             self._annotate(rqlst)
             if args:
-                 # different SQL generated when some argument is None or not (IS
+                # different SQL generated when some argument is None or not (IS
                 # NULL). This should be considered when computing sql cache key
                 cachekey += tuple(sorted([k for k,v in args.iteritems()
                                           if v is None]))