From 3dc214d1fa05f71e8dd12c71271cb1308abf7148 Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Fri, 27 Jul 2018 15:24:09 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E5=A4=8Dorg=E4=B8=8B?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9F=A5=E7=9C=8B=E6=88=91=E7=9A=84=E8=B5=84?= =?UTF-8?q?=E4=BA=A7=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=B7=B2=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E8=8A=82=E7=82=B9/=E8=B5=84=E4=BA=A7=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/perms/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/perms/api.py b/apps/perms/api.py index 6d249993d..042070f47 100644 --- a/apps/perms/api.py +++ b/apps/perms/api.py @@ -101,6 +101,7 @@ class UserGrantedNodesApi(ListAPIView): return nodes.keys() def get_permissions(self): + set_current_org(Organization.root()) if self.kwargs.get('pk') is None: self.permission_classes = (IsValidUser,) return super().get_permissions() @@ -157,6 +158,7 @@ class UserGrantedNodeAssetsApi(ListAPIView): return assets def get_permissions(self): + set_current_org(Organization.root()) if self.kwargs.get('pk') is None: self.permission_classes = (IsValidUser,) return super().get_permissions()