/api/v4/projects/{project_id}/access_tokens search is not working

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

search parameter in projects access_tokens api list does not filter

Steps to reproduce

Example Project

https://gitlab.com/api/v4/projects/67665196

image

What is the current bug behavior?

The API returns all tokens not just the ones containing the value of the search parameter

image

What is the expected correct behavior?

The API should only return tokens containing the value of the search parameter in their name.

https://docs.gitlab.com/api/project_access_tokens/#list-all-project-access-tokens

Relevant logs and/or screenshots

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by 🤖 GitLab Bot 🤖