LDAP override throws 404 when member has "Minimal access"

Summary

Can't "Revert to LDAP group sync settings" if member has "Minimal access"

Steps to reproduce

  1. Setup LDAP in GDK
  2. Create a group and setup LDAP group sync
  3. Click the "Edit permissions" button next to a member
  4. Change their role to "Minimal access"
  5. Choose "Revert to LDAP group sync settings" in the dropdown

Example Project

What is the current bug behavior?

Reverting to group sync settings when user has "Minimal access" role causes 404

What is the expected correct behavior?

Should be able to revert to group sync settings no matter the access level the member has

Relevant logs and/or screenshots

Screen_Recording_2020-10-16_at_5.32.45_PM

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 Peter Hegman