49 lines
2.8 KiB
Text
49 lines
2.8 KiB
Text
%main{ :role => "main" }
|
|
.modal-no-backdrop.modal-doorkeepr-auth
|
|
.modal-content
|
|
.modal-header
|
|
%h3.page-title
|
|
- link_to_client = link_to(@pre_auth.client.name, @pre_auth.redirect_uri, target: '_blank', rel: 'noopener noreferrer')
|
|
= _("Authorize %{link_to_client} to use your account?").html_safe % { link_to_client: link_to_client }
|
|
|
|
.modal-body
|
|
- if current_user.admin?
|
|
.text-warning
|
|
%p
|
|
= icon("exclamation-triangle fw")
|
|
= _('You are an admin, which means granting access to <strong>%{client_name}</strong> will allow them to interact with GitLab as an admin as well. Proceed with caution.').html_safe % { client_name: @pre_auth.client.name }
|
|
%p
|
|
- link_to_client = link_to(@pre_auth.client.name, @pre_auth.redirect_uri, target: '_blank', rel: 'noopener noreferrer')
|
|
= _("An application called %{link_to_client} is requesting access to your GitLab account.").html_safe % { link_to_client: link_to_client }
|
|
|
|
- auth_app_owner = @pre_auth.client.application.owner
|
|
- if auth_app_owner
|
|
- link_to_owner = link_to(auth_app_owner.name, user_path(auth_app_owner))
|
|
= _("This application was created by %{link_to_owner}.").html_safe % { link_to_owner: link_to_owner }
|
|
|
|
= _("Please note that this application is not provided by GitLab and you should verify its authenticity before allowing access.")
|
|
- if @pre_auth.scopes
|
|
%p
|
|
= _("This application will be able to:")
|
|
%ul
|
|
- @pre_auth.scopes.each do |scope|
|
|
%li
|
|
%strong= t scope, scope: [:doorkeeper, :scopes]
|
|
.text-secondary= t scope, scope: [:doorkeeper, :scope_desc]
|
|
.form-actions.text-right
|
|
= form_tag oauth_authorization_path, method: :delete, class: 'inline' do
|
|
= hidden_field_tag :client_id, @pre_auth.client.uid
|
|
= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
|
|
= hidden_field_tag :state, @pre_auth.state
|
|
= hidden_field_tag :response_type, @pre_auth.response_type
|
|
= hidden_field_tag :scope, @pre_auth.scope
|
|
= hidden_field_tag :nonce, @pre_auth.nonce
|
|
= submit_tag _("Deny"), class: "btn btn-danger"
|
|
= form_tag oauth_authorization_path, method: :post, class: 'inline' do
|
|
= hidden_field_tag :client_id, @pre_auth.client.uid
|
|
= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
|
|
= hidden_field_tag :state, @pre_auth.state
|
|
= hidden_field_tag :response_type, @pre_auth.response_type
|
|
= hidden_field_tag :scope, @pre_auth.scope
|
|
= hidden_field_tag :nonce, @pre_auth.nonce
|
|
= submit_tag _("Authorize"), class: "btn btn-success gl-ml-3", data: { qa_selector: 'authorization_button' }
|