Skip to content

Commit

Permalink
[Artifacts] Verify artifact permissions when listing artifact tags (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerShor committed Jun 2, 2024
1 parent 99cfe61 commit aff5943
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions server/api/api/endpoints/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ async def list_artifact_tags(
mlrun.common.schemas.AuthorizationAction.read,
auth_info,
)
# verify that the user has permissions to read the project's artifacts
await server.api.utils.auth.verifier.AuthVerifier().query_project_resource_permissions(
mlrun.common.schemas.AuthorizationResourceTypes.artifact,
project,
"",
mlrun.common.schemas.AuthorizationAction.read,
auth_info,
)

tags = await run_in_threadpool(
server.api.crud.Artifacts().list_artifact_tags, db_session, project, category
)
Expand Down

0 comments on commit aff5943

Please sign in to comment.