Loading
Remove Security Manager frontend feature flag gate
What does this MR do and why?
The Security Manager role is always enabled, so the forced security_manager_role_enabled flag and the constants.js reader that depends on it no longer gate anything.
- Dropped the
push_force_frontend_feature_flagcall fromlib/gitlab/gon_helper.rb. - Removed
isSecurityManagerEnabledand unwrapped its four conditional spreads inapp/assets/javascripts/access_level/constants.js. - Inlined the role object into
BASE_ROLES, since the named const only existed to be spread conditionally. - Updated 3 Jest specs whose expected role lists change now that the role is always present.
The gon push and the constants.js reader have to go together. Removing the push on its own leaves the reader on an undefined flag, which is falsy, and the role disappears from the role pickers.
Independent of !256052 (merged) and !256056 (merged), so this targets master directly. No RSpec spec asserts the flag.
How to set up and validate locally
yarn jest spec/frontend/access_level spec/frontend/members ee/spec/frontend/roles_and_permissions ee/spec/frontend/pages/projects/shared/permissions
bundle exec rspec spec/lib/gitlab/gon_helper_spec.rb1738 Jest tests and 38 RSpec examples, 0 failures.
References
Part of the work in !239507 (closed)
Screenshots or screen recordings
No UI change. The role was already visible in production because the flag was forced true.