diff --git a/apps/api/permissions.py b/apps/api/permissions.py new file mode 100644 index 0000000..38e8cc2 --- /dev/null +++ b/apps/api/permissions.py @@ -0,0 +1,23 @@ +# -*- encoding: utf-8 -*- + +from rest_framework.permissions import BasePermission + + +class UserHasDiscordPermissions(BasePermission): + """ + Permission to ensure that the user is permitted to make + changes on behalf of the server they are representing. + """ + + + + +# class SubscriptionServerMember(BasePermission): +# """ +# Permission for each subscription that omits the sub if +# the request user isn't a member of it's server. +# """ + +# def has_object_permission(self, request, view, obj): + +# return obj.server in request.user.servers \ No newline at end of file