cubicweb #501413 has_permission() should return boolean values only [rejected]

The internal rql request could return an empty result set. A further boolean test against the returned result will be False whereas False means Unauthorized in this case.

--- a/entities/authobjs.py
+++ b/entities/authobjs.py
@@ -114,7 +114,8 @@ class CWUser(AnyEntity):
             kwargs['x'] = contexteid
             cachekey = 'x'
       try:
-            return self.req.execute(rql, kwargs, cachekey)
+            self.req.execute(rql, kwargs, cachekey)
+            return True
       except Unauthorized:
             return False
prioritynormal
typebug
done in3.5.6
load0.000
load left0.000
closed by<not specified>