Unable to change custom roles back to default roles after subscription change
Summary
When an Ultimate subscription changes to Premium, users with custom roles (created during the Ultimate subscription period) assigned cannot be reverted to default roles.
Steps to reproduce
On self-managed
- Install Ultimate license.
- Create a custom role, assign it to a user in one of the projects.
- Install Premium license over Ultimate.
- In the project click on the role, it is shown as empty in the dropdown.
- Select one of the regular roles and click
Update role. UI said Role was successfully updated. - Refresh the page - user still had the previously assigned custom role.
Same thing can happen on SaaS when a namespace gets change to Premium. e.g. when an Ultimate trial expires and the namespace reverts to Premium.
Example Project
What is the current bug behavior?
When an Ultimate subscription changes to Premium, users with custom roles (created during the Ultimate subscription period) assigned cannot be reverted to default roles.
What is the expected correct behavior?
Users with custom roles (created during the Ultimate subscription period) should be able to have a default role (non-custom role) assigned after the subscription changes from Ultimate.
Relevant logs and/or screenshots
Output of checks
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)
Workaround
Remove the user and re-add them with a default (non-custom) role.