mirror of https://github.com/jumpserver/jumpserver
fix(perms): 未激活资产不能使用
parent
f3d052554d
commit
373c6c77e0
|
@ -60,6 +60,7 @@ class SerializeToTreeNodeMixin:
|
|||
'isParent': False,
|
||||
'open': False,
|
||||
'iconSkin': self.get_platform(asset),
|
||||
'chkDisabled': not asset.is_active,
|
||||
'meta': {
|
||||
'type': 'asset',
|
||||
'asset': {
|
||||
|
|
|
@ -75,7 +75,7 @@ class AssetGrantedSerializer(serializers.ModelSerializer):
|
|||
model = Asset
|
||||
only_fields = [
|
||||
"id", "hostname", "ip", "protocols", "os", 'domain',
|
||||
"platform", "comment", "org_id",
|
||||
"platform", "comment", "org_id", "is_active"
|
||||
]
|
||||
fields = only_fields + ['org_name']
|
||||
read_only_fields = fields
|
||||
|
|
Loading…
Reference in New Issue