버그 수정: 일반 사용자 승인 체크 단계에서 어드민 예외 누락 보완 및 중첩 슬래시 라우팅 방어
This commit is contained in:
+1
-1
@@ -103,7 +103,7 @@ def get_current_user(request: Request, db: Session = Depends(get_db)):
|
|||||||
)
|
)
|
||||||
user = _provision_user(db, email, name)
|
user = _provision_user(db, email, name)
|
||||||
|
|
||||||
if not user.is_approved and not user.is_admin:
|
if not user.is_approved and not user.is_admin and email.lower() not in ADMIN_EMAILS:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_403_FORBIDDEN,
|
status_code=status.HTTP_403_FORBIDDEN,
|
||||||
detail="User is not approved by administrator",
|
detail="User is not approved by administrator",
|
||||||
|
|||||||
+4
-1
@@ -1,6 +1,9 @@
|
|||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const APP_BASE_PATH = (window.APP_BASE_PATH || '').replace(/\/$/, '');
|
const APP_BASE_PATH = (window.APP_BASE_PATH || '').replace(/\/$/, '');
|
||||||
const appUrl = (path) => `${APP_BASE_PATH}${path.startsWith('/') ? path : `/${path}`}`;
|
const appUrl = (path) => {
|
||||||
|
const rawUrl = `${APP_BASE_PATH}${path.startsWith('/') ? path : `/${path}`}`;
|
||||||
|
return rawUrl.replace(/\/+/g, '/');
|
||||||
|
};
|
||||||
|
|
||||||
// --- Elements ---
|
// --- Elements ---
|
||||||
// loginScreen / user-name 표시는 더 이상 존재하지 않음.
|
// loginScreen / user-name 표시는 더 이상 존재하지 않음.
|
||||||
|
|||||||
Reference in New Issue
Block a user