mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-03 08:25:04 +00:00
perf: 资产授权添加协议
This commit is contained in:
@@ -4,9 +4,10 @@ from rest_framework.generics import ListAPIView, get_object_or_404
|
||||
from common.utils import get_logger, lazyproperty
|
||||
from perms import serializers
|
||||
from perms.hands import Asset
|
||||
from perms.utils import PermAccountUtil
|
||||
from perms.utils import PermAssetDetailUtil
|
||||
from .mixin import SelfOrPKUserMixin
|
||||
from ...models import AssetPermission
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
__all__ = [
|
||||
@@ -26,5 +27,5 @@ class UserPermedAssetAccountsApi(SelfOrPKUserMixin, ListAPIView):
|
||||
return asset
|
||||
|
||||
def get_queryset(self):
|
||||
accounts = PermAccountUtil().get_permed_accounts_for_user(self.user, self.asset)
|
||||
accounts = PermAssetDetailUtil(self.user, self.asset).get_permed_accounts_for_user()
|
||||
return accounts
|
||||
|
Reference in New Issue
Block a user