Browse Source

[Update] 资产授权序列类is_expired, is_valid设置为read_only

pull/4019/head
Bai 5 years ago
parent
commit
75f4f6d0a2
  1. 6
      apps/perms/serializers/asset_permission.py

6
apps/perms/serializers/asset_permission.py

@ -36,14 +36,14 @@ class ActionsDisplayField(ActionsField):
class AssetPermissionSerializer(BulkOrgResourceModelSerializer):
actions = ActionsField(required=False, allow_null=True)
is_valid = serializers.BooleanField()
is_expired = serializers.BooleanField()
is_valid = serializers.BooleanField(read_only=True)
is_expired = serializers.BooleanField(read_only=True)
class Meta:
model = AssetPermission
mini_fields = ['id', 'name']
small_fields = mini_fields + [
'is_active', 'actions', 'created_by', 'date_created'
'is_active', 'is_expired', 'is_valid', 'actions', 'created_by', 'date_created'
]
m2m_fields = [
'users', 'user_groups', 'assets', 'nodes', 'system_users',

Loading…
Cancel
Save