cubicweb/pyramid/core.py
changeset 11701 ca536eec556b
parent 11686 41d4f0f3855c
child 11811 f09efeead7f9
equal deleted inserted replaced
11700:41ddaf6802f0 11701:ca536eec556b
   346         request._cw_cached_session = session
   346         request._cw_cached_session = session
   347     except:
   347     except:
   348         log.exception("Failed")
   348         log.exception("Failed")
   349         raise
   349         raise
   350 
   350 
   351     return session.user.groups
   351     with session.new_cnx() as cnx:
       
   352         with cnx.security_enabled(read=False):
       
   353             return set(group for group, in cnx.execute(
       
   354                 'Any GN WHERE U in_group G, G name GN, U eid %(userid)s',
       
   355                 {'userid': login}))
   352 
   356 
   353 
   357 
   354 def includeme(config):
   358 def includeme(config):
   355     """ Enables the core features of Pyramid CubicWeb.
   359     """ Enables the core features of Pyramid CubicWeb.
   356 
   360