Update SAML buttons to pajamas
What does this MR do and why?
Update SAML buttons to pajamas
- update saml_link method to return button or link
Changelog: changed
EE: true
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Page | Before | After |
---|---|---|
http://gdk.test:3443/groups/gitlab-org/-/saml |
||
http://gdk.test:3443/groups/gitlab-org/-/saml/sso |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
For https://gdk.test:3443/groups/gitlab-org/-/saml
- Follow the gdk docs to set up saml (not that bad)
- Navigate to https://gdk.test:3443/groups/gitlab-org/-/saml
- For the
Identity provider single sign-on URL
field enterhttps://localhost:8443/simplesaml/saml2/idp/SSOService.php
- For the
Certificate fingerprint
field enter119b9e027959cdb7c662cfd075d9e2ef384e445f
- Save the configuration
- Toggle the
Enable SAML authentication for this group
checkbox. TheVerify SAML Configuration
button should be come disabled
For https://gdk.test:3443/groups/gitlab-org/-/saml/sso
- Follow the gdk docs to set up saml (not that bad)
- Navigate to http://gdk.test:3443/groups/gitlab-org/-/saml/sso
- Apply the below patch to view both
saml_link
s on the page
diff --git a/ee/app/views/groups/sso/saml.html.haml b/ee/app/views/groups/sso/saml.html.haml
index 57f5f3f6e290..3ef5143b0ec6 100644
--- a/ee/app/views/groups/sso/saml.html.haml
+++ b/ee/app/views/groups/sso/saml.html.haml
@@ -16,6 +16,7 @@
- c.with_body do
= s_('SAML|To allow %{strongOpen}%{group_name}%{strongClose} to manage your GitLab account %{strongOpen}%{username}%{strongClose} (%{email}) after you sign in successfully using single sign-on, select %{strongOpen}Authorize%{strongClose}.').html_safe % { strongOpen: '<strong>'.html_safe, group_name: @group_name, strongClose: '</strong>'.html_safe, username: current_user.username, email: current_user.email }
= saml_button _('Authorize'), @group_path, variant: :confirm, block: true, data: { qa_selector: 'saml_sso_signin_button' }
+ = saml_link _('Sign in with single sign-on'), @group_path
- else
- button_text = _('Sign in')
#js-saml-authorize{ data: group_saml_sign_in(group: @group, group_name: @group_name, group_path: @group_path, redirect: @redirect_path, sign_in_button_text: button_text) }
- Refresh the page
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #417860 (closed)
Edited by Alexander Turinske