mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-17 15:59:04 +00:00
perf: change initial passwd to ChangeMe
This commit is contained in:
@@ -319,7 +319,7 @@ class AuthPostCheckMixin:
|
||||
|
||||
@classmethod
|
||||
def _check_passwd_is_too_simple(cls, user: User, password):
|
||||
if user.is_superuser and password == 'admin':
|
||||
if password == 'admin' or password == 'ChangeMe':
|
||||
message = _('Your password is too simple, please change it for security')
|
||||
url = cls.generate_reset_password_url_with_flash_msg(user, message=message)
|
||||
raise errors.PasswordTooSimple(url)
|
||||
|
@@ -27,8 +27,8 @@ def add_default_admin(apps, schema_editor):
|
||||
db_alias = schema_editor.connection.alias
|
||||
admin = user_model.objects.using(db_alias).create(
|
||||
username="admin", name="Administrator",
|
||||
email="admin@mycomany.com", role="Admin",
|
||||
password=make_password("admin"),
|
||||
email="admin@example.com", role="Admin",
|
||||
password=make_password("ChangeMe"),
|
||||
)
|
||||
group_model = apps.get_model("users", "UserGroup")
|
||||
default_group = group_model.objects.using(db_alias).get(name="Default")
|
||||
|
Reference in New Issue
Block a user