fix: 修复资产详情授权用户授权规则列表的搜索项

pull/9562/head
Bai 2023-02-15 14:48:31 +08:00 committed by Jiangjie.Bai
parent 9a39aca0f1
commit 0828a0e9ba
6 changed files with 8 additions and 7 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:441239d12ee3ba50b36b3e5b31246993601414d4d119c2c784e56b54208a5a96
size 135089
oid sha256:01857f512b7280cc7db6be734dc3aa266f6384b222addca127eabbe61de47bb2
size 135229

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bef1d490ea8a2c381a929d8c214e6be9126efcacc98bc0ea09344bef46369d9e
size 111567
oid sha256:037f861dc9c6f7ea80ce09276e0eb417b60292fac4d7dcca02f661a53688e6e9
size 111627

View File

@ -2480,7 +2480,7 @@ msgstr "{} 不能为空"
#: authentication/serializers/token.py:79 perms/serializers/permission.py:30
#: perms/serializers/permission.py:62 users/serializers/user.py:160
msgid "Is valid"
msgstr "账号是否有效"
msgstr "是否有效"
#: authentication/tasks.py:12
msgid "Clean expired session"

View File

@ -1,4 +1,5 @@
from django_filters import rest_framework as filters
from django.utils.translation import ugettext_lazy as _
from django.db.models import QuerySet, Q
from common.drf.filters import BaseFilterSet

View File

@ -67,7 +67,7 @@ class AssetPermission(JMSOrgBaseModel):
'assets.Node', related_name='granted_by_permissions', blank=True, verbose_name=_("Nodes")
)
# 特殊的账号: @ALL, @INPUT @USER 默认包含,将来在全局设置中进行控制.
accounts = models.JSONField(default=list, verbose_name=_("Accounts"))
accounts = models.JSONField(default=list, verbose_name=_("Account"))
actions = models.IntegerField(default=ActionChoices.connect, verbose_name=_("Actions"))
date_start = models.DateTimeField(default=timezone.now, db_index=True, verbose_name=_("Date start"))
date_expired = models.DateTimeField(

View File

@ -29,7 +29,7 @@ class AssetPermissionSerializer(BulkOrgResourceModelSerializer):
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"))
accounts = serializers.ListField(label=_("Accounts"), required=False)
accounts = serializers.ListField(label=_("Account"), required=False)
class Meta:
model = AssetPermission