Browse Source

Merge branch 'v3' of github.com:jumpserver/jumpserver into v3

pull/9246/head
ibuler 2 years ago
parent
commit
dd630f0e14
  1. 1
      .gitignore
  2. 8
      apps/perms/serializers/permission.py

1
.gitignore vendored

@ -16,6 +16,7 @@ dump.rdb
.cache/
.idea/
.vscode/
.fleet/
db.sqlite3
config.py
config.yml

8
apps/perms/serializers/permission.py

@ -20,12 +20,12 @@ class ActionChoicesField(BitChoicesField):
class AssetPermissionSerializer(BulkOrgResourceModelSerializer):
users = ObjectRelatedField(queryset=User.objects, many=True, required=False)
users = ObjectRelatedField(queryset=User.objects, many=True, required=False, label=_('User'))
user_groups = ObjectRelatedField(
queryset=UserGroup.objects, many=True, required=False
queryset=UserGroup.objects, many=True, required=False, label=_('User group')
)
assets = ObjectRelatedField(queryset=Asset.objects, many=True, required=False)
nodes = ObjectRelatedField(queryset=Node.objects, many=True, required=False)
assets = ObjectRelatedField(queryset=Asset.objects, many=True, required=False, label=_('Asset'))
nodes = ObjectRelatedField(queryset=Node.objects, many=True, required=False, label=_('Node'))
actions = ActionChoicesField(required=False, allow_null=True, label=_("Actions"))
is_valid = serializers.BooleanField(read_only=True, label=_("Is valid"))
is_expired = serializers.BooleanField(read_only=True, label=_("Is expired"))

Loading…
Cancel
Save