Cannot Enable Group Access Token after being disabled
Summary
Group Access Tokens can be enabled or disabled by toggling the Users can create project access tokens and group access tokens in this group option. However due to a potential regression from this MR: Policy change to read and destroy token without license for .com, once this is disabled, the option will disappear and cannot be enabled again.
Steps to reproduce
- Create a top-level group.
- Go to the group page.'
- Go to Settings > General > Permissions and group features.
- Under Permissions, uncheck the
Users can create project access tokens and group access tokens in this groupoption. - Refresh the page and observe the option is already missing.
Example Project
What is the current bug behavior?
- Group administrators are unable to enable group access token again once it is disabled.
What is the expected correct behavior?
- Group administrators should be to enable group access token again after disabling it.
Relevant logs and/or screenshots
- Default options when a group is created.
- Option is missing after disabling it.
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
- A temporary workaround is to enable it back using the rails console.
group = Group.find(GROUPID)
group.namespace_settings.update(resource_access_token_creation_allowed: true)
Edited by Kent Japhet Ballon

