access denied fix

This commit is contained in:
Константин Лебединский
2026-04-30 13:31:54 +05:00
parent c4a7d2ef08
commit ebb58d4b5a
4 changed files with 75 additions and 37 deletions
+4 -1
View File
@@ -14,7 +14,7 @@ from flask import (
url_for,
)
from ..config import get_dev_fio_password, is_assignment_feature_enabled, is_dev_ui
from ..config import get_dev_fio_password, is_assignment_feature_enabled, is_dev_ui, is_hr_auth_enabled
from ..messages import RU
from .decorators import login_required, current_user
from .services import AuthError, authenticate_credentials
@@ -50,6 +50,7 @@ def login_page():
'auth/login.html',
next=_safe_next('/'),
dev_fio_enabled=bool(get_dev_fio_password()),
hr_auth_enabled=is_hr_auth_enabled(),
)
@@ -66,6 +67,7 @@ def login_submit():
next=_safe_next('/'),
login=login,
dev_fio_enabled=bool(get_dev_fio_password()),
hr_auth_enabled=is_hr_auth_enabled(),
), e.status
except Exception:
log.exception('login_submit failed')
@@ -75,6 +77,7 @@ def login_submit():
next=_safe_next('/'),
login=login,
dev_fio_enabled=bool(get_dev_fio_password()),
hr_auth_enabled=is_hr_auth_enabled(),
), 500
return redirect(_safe_next('/'))