(self, request, agora, **kwargs)
return self.create_response(request,
            dict(permissions=agora.get_perms(user)))
Returns the permissions the user that requested it has
Returns the permissions the user that requested it has
Returns the permissions the user that requested it has
def get_permissions_action(self, request, agora, **kwargs):
        '''
        Returns the permissions the user that requested it has
        '''
        user = request.user
        if 'userid' in kwargs:
            if not agora.has_perms('admin', request.user):
                return self.create_response(request,
                    dict(permissions=[]))
            user = get_object_or_404(User, id=kwargs['userid'])

        return self.create_response(request,
            dict(permissions=agora.get_perms(user)))
def get_permissions_action ( self , request , agora , * * kwargs ) : user = request . user if 'userid' in kwargs : if not agora . has_perms ( 'admin' , request . user ) : return self . create_response ( request , dict ( permissions = [ ] ) ) user = get_object_or_404 ( User , id = kwargs [ 'userid' ] ) return self . create_response ( request , dict ( permissions = agora . get_perms ( user ) ) )