refactor: rename require_admin_auth/require_admin_or_agent to require_user_auth/require_user_or_agent
These dependencies check actor type (human user vs agent), not admin privilege. The old names were misleading and could cause authorization mistakes when wiring new endpoints. Renamed across all 10 consumer files along with their local ADMIN_AUTH_DEP / ADMIN_OR_AGENT_DEP aliases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
Abhimanyu Saharan
parent
ea78b41a36
commit
cc50877131
@@ -18,7 +18,7 @@ from app.api.deps import (
|
||||
get_board_for_actor_read,
|
||||
get_board_for_actor_write,
|
||||
get_board_for_user_write,
|
||||
require_admin_or_agent,
|
||||
require_user_or_agent,
|
||||
)
|
||||
from app.core.logging import get_logger
|
||||
from app.core.time import utcnow
|
||||
@@ -58,7 +58,7 @@ BOARD_READ_DEP = Depends(get_board_for_actor_read)
|
||||
BOARD_WRITE_DEP = Depends(get_board_for_actor_write)
|
||||
BOARD_USER_WRITE_DEP = Depends(get_board_for_user_write)
|
||||
SESSION_DEP = Depends(get_session)
|
||||
ACTOR_DEP = Depends(require_admin_or_agent)
|
||||
ACTOR_DEP = Depends(require_user_or_agent)
|
||||
|
||||
|
||||
def _parse_since(value: str | None) -> datetime | None:
|
||||
|
||||
Reference in New Issue
Block a user