diff --git a/app/modules/dispatch/router.py b/app/modules/dispatch/router.py index 6d5184f..1190782 100644 --- a/app/modules/dispatch/router.py +++ b/app/modules/dispatch/router.py @@ -284,11 +284,9 @@ async def batch_create( async def batch_delete( request: Request, batch_id: int, user: dict[str, Any] = Depends(_require_user) ) -> RedirectResponse: - """배치 삭제 — 관리자 전용(박스/상품/로그 CASCADE).""" - from app.store import is_admin # noqa: WPS433 - - if not is_admin(user): - raise HTTPException(status_code=403, detail="배치 삭제는 관리자만 가능합니다.") + """배치 삭제 — 슈퍼 관리자 전용(박스/상품/로그 CASCADE).""" + if not bool(user.get("is_super_admin")): + raise HTTPException(status_code=403, detail="배치 삭제는 슈퍼 관리자만 가능합니다.") st = _store(request) if st is None: raise HTTPException(status_code=503, detail="dispatch_db 미설정") diff --git a/app/modules/dispatch/templates/dispatch/batches.html b/app/modules/dispatch/templates/dispatch/batches.html index aac62c9..10a3972 100644 --- a/app/modules/dispatch/templates/dispatch/batches.html +++ b/app/modules/dispatch/templates/dispatch/batches.html @@ -37,6 +37,12 @@ 피킹 전달 다운로드 + {% if is_super %} +
+ +
+ {% endif %} {% endfor %}