Skip to content

Fix styling of "Enabled OAuth sign-in sources" checkboxes

📖 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

  1. Modify gitlab.yml to add available omniauth providers. Find the development -> 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' }
  1. Restart GDK (gdk restart)
  2. 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
Screen_Shot_2021-03-10_at_10.32.12_AM Screen_Shot_2021-03-10_at_10.31.02_AM

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

Merge request reports

Loading