diff --git a/apps/terminal/backends/command/serializers.py b/apps/terminal/backends/command/serializers.py index caedb04a8..4545bbe65 100644 --- a/apps/terminal/backends/command/serializers.py +++ b/apps/terminal/backends/command/serializers.py @@ -12,6 +12,6 @@ class SessionCommandSerializer(serializers.Serializer): input = serializers.CharField(max_length=128) output = serializers.CharField(max_length=1024, allow_blank=True) session = serializers.CharField(max_length=36) - org_id = serializers.CharField(max_length=36, required=False, default='') + org_id = serializers.CharField(max_length=36, required=False, default='', allow_null=True) timestamp = serializers.IntegerField() diff --git a/apps/users/api.py b/apps/users/api.py index 012c2db1d..89ab0d129 100644 --- a/apps/users/api.py +++ b/apps/users/api.py @@ -103,7 +103,7 @@ class UserUpdatePKApi(generics.UpdateAPIView): class UserUnblockPKApi(generics.UpdateAPIView): queryset = User.objects.all() - permission_classes = (IsSuperUser,) + permission_classes = (IsOrgAdmin,) serializer_class = UserSerializer key_prefix_limit = "_LOGIN_LIMIT_{}_{}" key_prefix_block = "_LOGIN_BLOCK_{}"