diff --git a/app/store.py b/app/store.py index 4ccf352..87f29e5 100644 --- a/app/store.py +++ b/app/store.py @@ -228,7 +228,15 @@ def has_module(user_rec: dict[str, Any] | None, module: str) -> bool: if is_admin(user_rec): return True mods = user_rec.get("modules") or {} - return bool(mods.get(module)) + if mods.get(module): + return True + # 승인자(_approver) 권한이 있으면 해당 모듈 접근도 허용 — + # 본인 경비 등록/제출도 가능해야 하므로. + if module in APPROVER_KEYS: + return False + if mods.get(f"{module}_approver"): + return True + return False def is_approver(user_rec: dict[str, Any] | None, kind: str) -> bool: