Skip to content

fix: remove preferred username from the search body of the summary if admin #636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion diracx-logic/src/diracx/logic/jobs/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async def search(
async def summary(
config: Config,
job_db: JobDB,
preferred_username: str,
preferred_username: str | None,
body: SummaryParams,
):
"""Show information suitable for plotting."""
Expand Down
6 changes: 5 additions & 1 deletion diracx-routers/src/diracx/routers/jobs/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,13 @@ async def summary(
"""
await check_permissions(action=ActionType.QUERY, job_db=job_db)

preferred_username: str | None = user_info.preferred_username
if JOB_ADMINISTRATOR in user_info.properties:
preferred_username = None

return await summary_bl(
config=config,
job_db=job_db,
preferred_username=user_info.preferred_username,
preferred_username=preferred_username,
body=body,
)