1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-27 23:56:18 +00:00

change password check (#6656)

* change password check

* update

* Update views.py

* optimize-code

* remove min_len and level when frontend check password

* remove too short level

---------

Co-authored-by: r350178982 <32759763+r350178982@users.noreply.github.com>
This commit is contained in:
Michael An
2024-08-28 17:52:54 +08:00
committed by GitHub
parent 0aa7c7da00
commit fedfbf9bf4
13 changed files with 48 additions and 103 deletions

View File

@@ -14,7 +14,6 @@ from constance import config
from seahub import settings
from seahub.utils.auth import get_login_bg_image_path
from seahub.utils.password import get_password_strength_requirements
def activate(request, backend,
@@ -220,9 +219,5 @@ def register(request, backend, success_url=None, form_class=None,
context['form'] = form
login_bg_image_path = get_login_bg_image_path()
context['login_bg_image_path'] = login_bg_image_path
password_strength_requirements = get_password_strength_requirements()
context['min_len'] = password_strength_requirements.get('min_len')
context['level'] = len(password_strength_requirements.get('char_types'))
context['strong_pwd_required'] = config.USER_STRONG_PASSWORD_REQUIRED
return render(request, template_name, context)