def get_permission(self): if self.request.method in permissions.SAFE_METHODS: return (permissions.AllowAny(), ) return ( permissions.isAuthenticated(), IsAuthorOfPost(), )
def get_permissions(self): if self.request.method in permissions.SAFE_METHODS: return (permissions.AllowAny(),) if self.request.method == 'POST': return (permissions.AllowAny(),) return (permissions.isAuthenticated(), IsAccountOwner(),)
def get_permission(self): if self.request.method in permissions.SAFE_METHODS: return (permissions.AllowAny(),) return (permissions.isAuthenticated(), IsAuthorOfPost(),)