Compare commits

...

6 Commits

Author SHA1 Message Date
Bai
471cb45535 perf: 修改Latest version 2021-04-22 18:52:38 +08:00
Bai
11b0aa3b12 fix: 修复操作应用/应用授权/acl等未记录日志的问题2 2021-04-20 16:47:08 +08:00
ibuler
4b1b63f7b8 fix: 修复i18n一个翻译问题 2021-04-20 13:09:44 +08:00
Bai
512534715b fix: 修复操作应用/应用授权/acl等未记录日志的问题 2021-04-20 00:07:34 -05:00
ibuler
761ff5091a fix(task): 修复推送过期的问题 2021-04-19 22:42:30 -05:00
ibuler
87894df126 fix: 修复创建的系统用户很快过期的问题 2021-04-19 17:01:18 +08:00
7 changed files with 32 additions and 13 deletions

View File

@@ -33,6 +33,9 @@ class LoginACL(BaseACL):
class Meta: class Meta:
ordering = ('priority', '-date_updated', 'name') ordering = ('priority', '-date_updated', 'name')
def __str__(self):
return self.name
@property @property
def action_reject(self): def action_reject(self):
return self.action == self.ActionChoices.reject return self.action == self.ActionChoices.reject

View File

@@ -38,6 +38,9 @@ class LoginAssetACL(BaseACL, OrgModelMixin):
unique_together = ('name', 'org_id') unique_together = ('name', 'org_id')
ordering = ('priority', '-date_updated', 'name') ordering = ('priority', '-date_updated', 'name')
def __str__(self):
return self.name
@classmethod @classmethod
def filter(cls, user, asset, system_user, action): def filter(cls, user, asset, system_user, action):
queryset = cls.objects.filter(action=action) queryset = cls.objects.filter(action=action)

View File

@@ -56,8 +56,8 @@ def get_push_unixlike_system_user_tasks(system_user, username=None):
'shell': system_user.shell or Empty, 'shell': system_user.shell or Empty,
'state': 'present', 'state': 'present',
'home': system_user.home or Empty, 'home': system_user.home or Empty,
'expires': -1,
'groups': groups or Empty, 'groups': groups or Empty,
'expires': 99999,
'comment': comment 'comment': comment
} }

View File

@@ -27,11 +27,23 @@ json_render = JSONRenderer()
MODELS_NEED_RECORD = ( MODELS_NEED_RECORD = (
'User', 'UserGroup', 'Asset', 'Node', 'AdminUser', 'SystemUser', # users
'Domain', 'Gateway', 'Organization', 'AssetPermission', 'CommandFilter', 'User', 'UserGroup',
'CommandFilterRule', 'License', 'Setting', 'Account', 'SyncInstanceTask', # acls
'Platform', 'ChangeAuthPlan', 'GatherUserTask', 'LoginACL', 'LoginAssetACL',
'RemoteApp', 'RemoteAppPermission', 'DatabaseApp', 'DatabaseAppPermission', # assets
'Asset', 'Node', 'AdminUser', 'SystemUser', 'Domain', 'Gateway', 'CommandFilterRule',
'CommandFilter', 'Platform',
# applications
'Application',
# orgs
'Organization',
# settings
'Setting',
# perms
'AssetPermission', 'ApplicationPermission',
# xpack
'License', 'Account', 'SyncInstanceTask', 'ChangeAuthPlan', 'GatherUserTask',
) )

View File

@@ -1 +1,2 @@

Binary file not shown.

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: JumpServer 0.3.3\n" "Project-Id-Version: JumpServer 0.3.3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-04-14 17:52+0800\n" "POT-Creation-Date: 2021-04-20 11:56+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n" "Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: JumpServer team<ibuler@qq.com>\n" "Language-Team: JumpServer team<ibuler@qq.com>\n"
@@ -984,25 +984,25 @@ msgid ""
"The task of self-checking is already running and cannot be started repeatedly" "The task of self-checking is already running and cannot be started repeatedly"
msgstr "自检程序已经在运行,不能重复启动" msgstr "自检程序已经在运行,不能重复启动"
#: assets/tasks/push_system_user.py:192 #: assets/tasks/push_system_user.py:193
#: assets/tasks/system_user_connectivity.py:89 #: assets/tasks/system_user_connectivity.py:89
msgid "System user is dynamic: {}" msgid "System user is dynamic: {}"
msgstr "系统用户是动态的: {}" msgstr "系统用户是动态的: {}"
#: assets/tasks/push_system_user.py:232 #: assets/tasks/push_system_user.py:233
msgid "Start push system user for platform: [{}]" msgid "Start push system user for platform: [{}]"
msgstr "推送系统用户到平台: [{}]" msgstr "推送系统用户到平台: [{}]"
#: assets/tasks/push_system_user.py:233 #: assets/tasks/push_system_user.py:234
#: assets/tasks/system_user_connectivity.py:81 #: assets/tasks/system_user_connectivity.py:81
msgid "Hosts count: {}" msgid "Hosts count: {}"
msgstr "主机数量: {}" msgstr "主机数量: {}"
#: assets/tasks/push_system_user.py:272 assets/tasks/push_system_user.py:298 #: assets/tasks/push_system_user.py:273 assets/tasks/push_system_user.py:299
msgid "Push system users to assets: {}" msgid "Push system users to assets: {}"
msgstr "推送系统用户到入资产: {}" msgstr "推送系统用户到入资产: {}"
#: assets/tasks/push_system_user.py:284 #: assets/tasks/push_system_user.py:285
msgid "Push system users to asset: {}({}) => {}" msgid "Push system users to asset: {}({}) => {}"
msgstr "推送系统用户到入资产: {}({}) => {}" msgstr "推送系统用户到入资产: {}({}) => {}"
@@ -3036,7 +3036,7 @@ msgstr "正常"
#: terminal/const.py:34 #: terminal/const.py:34
msgid "Offline" msgid "Offline"
msgstr "" msgstr "离线"
#: terminal/exceptions.py:8 #: terminal/exceptions.py:8
msgid "Bulk create not support" msgid "Bulk create not support"