Fix styling of "Enabled OAuth sign-in sources" checkboxes
requested to merge 29126-enabled-oauth-sign-in-sources-has-confusing-ui-for-disabling-enabling-omniauth-providers into master
📖 What does this MR do?
Related to #29126 (closed)
Fixes the styling of the "Enabled OAuth sign-in sources" checkboxes in "Admin" -> "Settings" -> "General" -> "Sign-in restrictions". I am not 100% sure why they were originally styled like this. My theory is that we were originally using Bootstrap toggle buttons but these broke at somepoint when the JavaScript responsible for making these work was changed.
💻 Local testing
- Modify
gitlab.yml
to add available omniauth providers. Find thedevelopment
->omniauth
->providers
section and change to:
development:
<<: *base
omniauth:
providers:
- { name: 'google_oauth2',
app_id: '',
app_secret: '',
args: { access_type: 'offline', approval_prompt: '' } }
- { name: 'github',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',
url: "https://github.com/",
verify_ssl: true,
args: { scope: 'user:email' } }
- { name: 'bitbucket',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET' }
- { name: 'gitlab',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',
args: { scope: 'api' } }
- { name: 'google_oauth2',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',
args: { access_type: 'offline', approval_prompt: '' } }
- { name: 'facebook',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET' }
- { name: 'twitter',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET' }
- Restart GDK (
gdk restart
) - Navigate to "Admin" -> "Settings" -> "General" -> "Sign-in restrictions" and find the "Enabled OAuth sign-in sources" section (
/admin/application_settings/general#js-signin-settings
).
📷 Screenshots
Before | After |
---|---|
🚦 Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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 Peter Hegman