mirror of https://github.com/jumpserver/jumpserver
perf: change initial passwd to ChangeMe
parent
17d96669fe
commit
ee258707c8
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue