From 8c12c382a5168d900daa5a8dd8356da0de5a0b11 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 25 Jul 2018 18:21:37 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E5=A4=8Dmerge=E5=B8=A6?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/backends/command/serializers.py | 2 +- apps/users/api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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_{}"