access denied fix
This commit is contained in:
@@ -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('/'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user