11 lines
282 B
Python
11 lines
282 B
Python
from fastapi import HTTPException, status
|
|
from app.core.config import settings
|
|
|
|
|
|
def require_admin() -> None:
|
|
if not settings.ADMIN_ENABLED:
|
|
raise HTTPException(
|
|
status_code=status.HTTP_403_FORBIDDEN,
|
|
detail="Admin module is disabled",
|
|
)
|