Browse Source

perf: 修改 command 命令执行

pull/8096/head
ibuler 3 years ago committed by Jiangjie.Bai
parent
commit
0addba7c14
  1. 1
      apps/perms/api/asset/user_permission/common.py
  2. 3
      apps/perms/api/system_user_permission.py

1
apps/perms/api/asset/user_permission/common.py

@ -141,7 +141,6 @@ class UserGrantedAssetSystemUsersForAdminApi(ListAPIView):
return queryset_list
@method_decorator(tmp_to_root_org(), name='list')
class MyGrantedAssetSystemUsersApi(UserGrantedAssetSystemUsersForAdminApi):
permission_classes = (IsValidUser,)

3
apps/perms/api/system_user_permission.py

@ -1,14 +1,11 @@
from rest_framework import generics
from django.utils.decorators import method_decorator
from assets.models import SystemUser
from common.permissions import IsValidUser
from orgs.utils import tmp_to_root_org
from perms.utils.asset.user_permission import get_user_all_asset_perm_ids
from .. import serializers
@method_decorator(tmp_to_root_org(), name='list')
class SystemUserPermission(generics.ListAPIView):
permission_classes = (IsValidUser,)
serializer_class = serializers.SystemUserSerializer

Loading…
Cancel
Save