

@cached(user=True)
def get_permission_objects(self, request):
    odm = perms.app.odm()
    user = request.cache.user
    perms = {
        
    }
    with odm.begin() as session:
        if user.is_authenticated():
            session.add(user)
            groups = set(user.groups)
        else:
            cfg = request.config
            query = session.query(odm.group)
            groups = set(query.filter_by(name=cfg['ANONYMOUS_GROUP']))
        for group in groups:
            perms.update(((p.name, p.policy) for p in group.permissions))
    return perms

dataset/ETHPy150Open quantmind/lux/lux/extensions/auth/backends.py AuthMixin.get_permission_objects/VarMisuse@22/26 `request`->`perms`