

def get_permissions(self, request, resources, actions=None):
    if (not actions):
        actions = ('read', 'update', 'create', 'delete')
    if (not isinstance(actions, (list, tuple))):
        actions = (actions,)
    if (not isinstance(resources, (list, tuple))):
        resources = (resources,)
    obj = {
        
    }
    if (not request.cache.user.is_superuser()):
        permissions = self.get_permission_objects(request)
        for resource in resources:
            perms = {
                
            }
            for action in actions:
                perms[action] = has_permission(request, permissions, resource, action)
            obj[resource] = perms
    else:
        for resource in resources:
            obj[resource] = dict(((a, True) for a in actions))
    return obj

dataset/ETHPy150Open quantmind/lux/lux/extensions/auth/backends.py AuthMixin.get_permissions/original