Not possible to re-enable "Users can create project access tokens and group access tokens in this group"

Summary

Since a recent update of our self-managed Gitlab 15.7 Community edition, it's not possible to re-enable the option "Users can create project access tokens and group access tokens in this group" in top-level groups once it has been disabled. The option disappears from the UI.

Steps to reproduce

  1. Create a top-level group on a self-managed GitLab-instance version 15.7.5
  2. Disable the option "Users can create project access tokens and group access tokens in this group" (see documentation).
  3. Now the option is gone from the UI, not possibility anymore to re-enable it.

What is the current bug behavior?

On top-level groups with the option "Users can create project access tokens and group access tokens in this group" enabled, it's possible to disable this option.

image

But for top-level groups with this option disabled, the control is gone and it can not be re-enabled anymore.

image

What is the expected correct behavior?

The control for the option "Users can create project access tokens and group access tokens in this group" should always be available, no matter the status is on or off.

Relevant logs and/or screenshots

See above.

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:         CentOS 7.9.2009
Current User:   git
Using RVM:      no
Ruby Version:   2.7.7p221
Gem Version:    3.1.6
Bundler Version:2.3.15
Rake Version:   13.0.6
Redis Version:  6.2.8
Sidekiq Version:6.5.7
Go Version:     unknown

GitLab information
Version:        15.7.5
Revision:       358d690d91c
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     12.12
URL:            https://gitlab.XXXXX.YY
HTTP Clone URL: https://gitlab.XXXXX.YY/some-group/some-project.git
SSH Clone URL:  git@gitlab.XXXXX.YY:some-group/some-project.git
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers: saml

GitLab Shell
Version:        14.14.0
Repository storages:
- default:      unix:/var/opt/gitlab/gitaly/gitaly.socket
GitLab Shell path:/opt/gitlab/embedded/service/gitlab-shell

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)

All tests pass.

Edited by Ronny Moreas