Merge branch 'dev' of http://github.com/jumpserver/jumpserver into pr@dev@feat_protect_resource

pull/9601/head
jiangweidong 2 years ago
commit fa5097fe28

@ -66,7 +66,7 @@ class AccountSecretsViewSet(RecordViewLogMixin, AccountViewSet):
'default': serializers.AccountSecretSerializer,
}
http_method_names = ['get', 'options']
# permission_classes = [RBACPermission, UserConfirmation.require(ConfirmType.MFA)]
permission_classes = [RBACPermission, UserConfirmation.require(ConfirmType.MFA)]
rbac_perms = {
'list': 'accounts.view_accountsecret',
'retrieve': 'accounts.view_accountsecret',

@ -146,7 +146,7 @@ class UserPermNodeUtil:
def get_ungrouped_node(self):
assets_amount = UserPermAssetUtil(self.user).get_direct_assets().count()
return PermNode.get_favorite_node(assets_amount)
return PermNode.get_ungrouped_node(assets_amount)
def get_top_level_nodes(self, with_unfolded_node=False):
# 是否有节点展开, 展开的节点

@ -14,4 +14,3 @@ protocols:
- postgresql
- sqlserver
- oracle
- clickhouse

@ -1,10 +1,10 @@
from rest_framework import serializers
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
from assets.models import Asset, Node
from common.serializers.fields import ObjectRelatedField
from perms.models import AssetPermission
from perms.serializers.permission import ActionChoicesField
from common.serializers.fields import ObjectRelatedField
from tickets.models import ApplyAssetTicket
from .common import BaseApplyAssetSerializer
from .ticket import TicketApplySerializer

Loading…
Cancel
Save