Skip to content

Commit

Permalink
fix invalid access action (#18188)
Browse files Browse the repository at this point in the history
Signed-off-by: orblazer <orblazer.minecraft@gmail.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
  • Loading branch information
orblazer and wy65701436 authored May 30, 2023
1 parent 5c42bc1 commit b021dbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/v2.0/handler/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (r *repositoryAPI) ListRepositories(ctx context.Context, params operation.L
}

func (r *repositoryAPI) GetRepository(ctx context.Context, params operation.GetRepositoryParams) middleware.Responder {
if err := r.RequireProjectAccess(ctx, params.ProjectName, rbac.ActionList, rbac.ResourceRepository); err != nil {
if err := r.RequireProjectAccess(ctx, params.ProjectName, rbac.ActionRead, rbac.ResourceRepository); err != nil {
return r.SendError(ctx, err)
}
repository, err := r.repoCtl.GetByName(ctx, fmt.Sprintf("%s/%s", params.ProjectName, params.RepositoryName))
Expand Down

0 comments on commit b021dbd

Please sign in to comment.