mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-04 17:01:09 +00:00
perf: 修改账号生成 (#11591)
* perf: 修改账号生成 * perf: 修改账号模版支持策略 * perf: 修改特殊字符数量 * perf: 修改 model 继承 * perf: 修改顺序 * perf: 修改 requirements * perf: 修改翻译 * perf: 修改随机生成密码 * perf: 修改密钥生成 * perf: 修复 bug --------- Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -4,11 +4,13 @@ from django.utils.translation import gettext_lazy as _
|
||||
from assets.const import Connectivity
|
||||
from common.db.fields import TreeChoices
|
||||
|
||||
string_punctuation = '!#$%&()*+,-.:;<=>?@[]^_~'
|
||||
DEFAULT_PASSWORD_LENGTH = 30
|
||||
DEFAULT_PASSWORD_RULES = {
|
||||
'length': DEFAULT_PASSWORD_LENGTH,
|
||||
'symbol_set': string_punctuation
|
||||
'uppercase': True,
|
||||
'lowercase': True,
|
||||
'digit': True,
|
||||
'symbol': True,
|
||||
}
|
||||
|
||||
__all__ = [
|
||||
@@ -41,8 +43,8 @@ class AutomationTypes(models.TextChoices):
|
||||
|
||||
|
||||
class SecretStrategy(models.TextChoices):
|
||||
custom = 'specific', _('Specific password')
|
||||
random = 'random', _('Random')
|
||||
custom = 'specific', _('Specific secret')
|
||||
random = 'random', _('Random generate')
|
||||
|
||||
|
||||
class SSHKeyStrategy(models.TextChoices):
|
||||
|
Reference in New Issue
Block a user