Inherited policies not displaying for Owner role and 500 error appears
Summary
Inherited policies aren't properly displaying and a 500 appeared.
After creating a different user with a Developer role, I can view policies that are inherited with that user. However, I had issues with the Owner role I was using in the screenshot above
Steps to reproduce
- HAR created here with the network logs from browser: https://drive.google.com/file/d/1Xs8AdXH1DKYTIn3Tv2HXalqscRHtFLNu/view?usp=sharing.
- I believe what may have happened is that in this particular test subgroup, I had tried creating a policy project in the past and then deleted it. I noticed as I tried to create a new policy, it created a new policy project, then created an MR here. In the activity it included this: "Grant Hickman restored source branch update-policy-1709252524 Feb 29, 2024, 5:22 PM". I think the fact it restored a branch indicated some past behavior in this repo. But it was likely some time back and I don't recall at all what may have been here. However, after creating an SPP, I still have the same behavior -- as owner, cannot view the policy list. As a developer (different user), i can view all policies fine.
Example Project
- https://gitlab.com/groups/haven-group/jaynestown/sub-subgroup-example/-/security/policies (the state of this may change at some point, but it's there for now!)
What is the current bug behavior?
- Inherited policies not displaying, 500 error
What is the expected correct behavior?
- Policies should display for all users
- There should be no 500 error
Relevant logs and/or screenshots
Supplied above
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)
Possible fixes
Edited by Grant Hickman