Skip to content

Convert admin mode feature flag to system application setting [RUN ALL RSPEC] [RUN AS-IF-FOSS]

What does this MR do?

As dicussed, this MR converts the existing feature flag for admin mode :user_mode_in_session to a configurable application setting at the instance level. The setting is named admin_mode and is disabled by default.

🛠 with at Siemens

/cc @reprazent @ifarkas @bufferoverflow

Open Points

  • We have always called this Admin Mode, but for branding and docs maybe there will be another name. So all naming is open on this MR
  • Documention is a skeleton, we probably want to expand on it (several rounds of review now done)
  • The setting is configured under Settings > General > Sign-in restrictions, but just because it seemed natural to me in there, also open for discussion

DB migration logs

$ bin/rails db:migrate
== 20210309160106 AddAdminModeToApplicationSetting: migrating =================
-- add_column(:application_settings, :admin_mode, :boolean, {:default=>false, :null=>false})
   -> 0.0079s
== 20210309160106 AddAdminModeToApplicationSetting: migrated (0.0080s) ========
$ bin/rails db:rollback
== 20210309160106 AddAdminModeToApplicationSetting: reverting =================
-- remove_column(:application_settings, :admin_mode, :boolean, {:default=>false, :null=>false})
   -> 0.0044s
== 20210309160106 AddAdminModeToApplicationSetting: reverted (0.0071s) ========

Screenshots (strongly suggested)

Originating Epic

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Diego Louzán

Merge request reports