mirror of https://github.com/jumpserver/jumpserver
Perm for assets (#3003)
* [Update] 授权显示节点下所有的资产 * [Update] 修改返回资产的comment * [Update] 修改节点返回字段pull/3004/head
parent
a8af4e8804
commit
5f59c729b7
|
@ -14,13 +14,14 @@ __all__ = [
|
|||
|
||||
class NodeSerializer(BulkOrgResourceModelSerializer):
|
||||
assets_amount = serializers.IntegerField(read_only=True)
|
||||
name = serializers.ReadOnlyField(source='value')
|
||||
|
||||
class Meta:
|
||||
model = Node
|
||||
only_fields = ['id', 'key', 'value', 'org_id']
|
||||
fields = only_fields + ['assets_amount']
|
||||
fields = only_fields + ['name', 'assets_amount']
|
||||
read_only_fields = [
|
||||
'key', 'assets_amount', 'org_id',
|
||||
'key', 'name', 'assets_amount', 'org_id',
|
||||
]
|
||||
|
||||
def validate_value(self, data):
|
||||
|
|
Loading…
Reference in New Issue