Unable to configure auditor status of users via the API
Summary
In #300127 (closed), the Auditor
status was added to the User API via the field is_auditor
. However, the issue additionally stated that it should be possible to modify the Auditor
status via the API as well. This was not implemented in the original issue.
So the respective user modification and creation API calls (PUT and POST with parameter auditor
) are missing.
Steps to reproduce
Try to set the auditor
role via the API:
curl --request PUT --header "PRIVATE-TOKEN: $ADMIN_TOKEN" "https://gitlab.local/api/v4/users/5?auditor=true"
Returned response still contains
"is_auditor":false
What is the current bug behavior?
User modification and creation API endpoints are missing the parameter auditor
that configures the Auditor
status of a user.
What is the expected correct behavior?
Auditor
status of a user can be configured for user creation and modification with the API.
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 18.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.7.5p203 Gem Version: 3.1.4 Bundler Version:2.2.33 Rake Version: 13.0.6 Redis Version: 6.2.6 Sidekiq Version:6.4.0 Go Version: unknown GitLab information Version: 15.0.0-ee Revision: 3b397c17532 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 12.10 URL: http://gitlab.here HTTP Clone URL: http://gitlab.here/some-group/some-project.git SSH Clone URL: git@gitlab.here:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: gitlab GitLab Shell Version: 14.3.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 14.3.0 ? ... OK (14.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... 2/1 ... yes 4/2 ... yes 1/3 ... yes 25/4 ... yes 4/5 ... yes 6/7 ... yes 9/8 ... yes 4/9 ... yes 4/10 ... yes 1/11 ... yes 41/12 ... yes 4/13 ... yes 4/14 ... yes Redis version >= 5.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.5) Git user has default SSH configuration? ... yes Active users: ... 5 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 7.x-8.x or OpenSearch version 1.x ... skipped (Advanced Search is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
Add the missing endpoints