fix: make RBAC dependencies properly chain _inject_user for OPC authorization
This commit is contained in:
@@ -159,7 +159,9 @@ async def proxy_auth(request: Request, response: Response):
|
||||
remote_groups_raw = request.headers.get("Remote-Groups", "")
|
||||
groups = [g.strip() for g in remote_groups_raw.split(",") if g.strip()]
|
||||
|
||||
logger.info(f"Proxy auth: user={remote_user}, groups={groups}")
|
||||
role = resolve_role(groups)
|
||||
logger.info(f"Resolved role: {role}")
|
||||
if role is None:
|
||||
logger.warning(f"User {remote_user} has no dashboard role (groups: {groups})")
|
||||
raise HTTPException(status_code=403, detail="User not authorized for dashboard")
|
||||
|
||||
Reference in New Issue
Block a user