diff --git a/InvenTree/InvenTree/api.py b/InvenTree/InvenTree/api.py index afd4d91de1..c204c0befb 100644 --- a/InvenTree/InvenTree/api.py +++ b/InvenTree/InvenTree/api.py @@ -20,8 +20,6 @@ from rest_framework.views import APIView from .views import AjaxView from .version import inventreeVersion, inventreeInstanceName -from users.models import check_user_role, RuleSet - from plugins import plugins as inventree_plugins @@ -70,7 +68,7 @@ class AttachmentMixin: attachment = serializer.save() attachment.user = self.request.user attachment.save() - + class ActionPluginView(APIView): """ diff --git a/InvenTree/InvenTree/permissions.py b/InvenTree/InvenTree/permissions.py index daa57136b3..f879559f11 100644 --- a/InvenTree/InvenTree/permissions.py +++ b/InvenTree/InvenTree/permissions.py @@ -45,7 +45,7 @@ class RolePermission(permissions.BasePermission): user = request.user # Superuser can do it all - if False and user.is_superuser: + if user.is_superuser: return True # Map the request method to a permission type