fix: modify job audit rbac

pull/14461/head
wangruidong 2024-11-14 15:42:51 +08:00 committed by Bryan
parent f03263eedf
commit 343c3607fa
5 changed files with 7 additions and 5 deletions

View File

@ -2917,7 +2917,7 @@ msgstr "否"
#: audits/models.py:47
msgid "Job audit log"
msgstr "ジョブ監査ログ"
msgstr "業務監査"
#: audits/models.py:56 audits/models.py:100 audits/models.py:175
#: terminal/models/session/session.py:39 terminal/models/session/sharing.py:113

View File

@ -2859,7 +2859,7 @@ msgstr "否"
#: audits/models.py:47
msgid "Job audit log"
msgstr "作业审计日志"
msgstr "作业审计"
#: audits/models.py:56 audits/models.py:100 audits/models.py:175
#: terminal/models/session/session.py:39 terminal/models/session/sharing.py:113

View File

@ -2861,7 +2861,7 @@ msgstr "否"
#: audits/models.py:47
msgid "Job audit log"
msgstr "作業審計日誌"
msgstr "作業審計"
#: audits/models.py:56 audits/models.py:100 audits/models.py:175
#: terminal/models/session/session.py:39 terminal/models/session/sharing.py:113

View File

@ -58,10 +58,10 @@ class VariableSerializer(CommonBulkModelSerializer):
def to_representation(self, instance):
data = super().to_representation(instance)
if instance.type == FieldType.select:
data['extra_args'] = instance.extra_args.get('options', '')
data['select_default_value'] = instance.default_value
if instance.type == FieldType.text:
data['text_default_value'] = instance.default_value
data['extra_args'] = instance.extra_args.get('options', '')
return data
@classmethod

View File

@ -64,6 +64,7 @@ extra_nodes_data = [
{'id': "tasks", "name": _("Task"), "pId": "view_setting"},
{'id': "license", "name": _("License"), "pId": "view_setting"},
{'id': "other", "name": _("Other"), "pId": "view_setting"},
{'id': "job_audit", "name": _("Job audit log"), "pId": "view_audit"},
]
# 将 model 放到其它节点下,而不是本来的 app 中
@ -109,7 +110,8 @@ special_pid_mapper = {
"rbac.view_webterminal": "view_workbench",
"rbac.view_filemanager": "view_workbench",
"rbac.view_systemtools": "view_workbench",
'tickets.view_ticket': 'tickets'
'tickets.view_ticket': 'tickets',
"audits.joblog": "job_audit",
}
special_setting_pid_mapper = {