debian-mirror-gitlab/app/views/doorkeeper/authorizations/new.html.haml

54 lines
3.2 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
%main{ :role => "main" }
2018-03-17 18:26:18 +05:30
.modal-no-backdrop.modal-doorkeepr-auth
.modal-content
.modal-header
%h3.page-title
2018-11-18 11:00:15 +05:30
- 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 }
2016-04-02 18:10:28 +05:30
2018-03-17 18:26:18 +05:30
.modal-body
- if current_user.admin?
.text-warning
%p
2021-02-22 17:27:13 +05:30
= sprite_icon('warning-solid')
2020-10-24 23:57:45 +05:30
= html_escape(_('You are an admin, which means granting access to %{client_name} will allow them to interact with GitLab as an admin as well. Proceed with caution.')) % { client_name: tag.strong(@pre_auth.client.name) }
2018-03-17 18:26:18 +05:30
%p
2018-11-18 11:00:15 +05:30
- 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 }
2016-04-02 18:10:28 +05:30
2018-03-17 18:26:18 +05:30
- auth_app_owner = @pre_auth.client.application.owner
- if auth_app_owner
2018-11-18 11:00:15 +05:30
- 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 }
2018-03-17 18:26:18 +05:30
2018-11-18 11:00:15 +05:30
= _("Please note that this application is not provided by GitLab and you should verify its authenticity before allowing access.")
2018-03-17 18:26:18 +05:30
- if @pre_auth.scopes
%p
2018-11-18 11:00:15 +05:30
= _("This application will be able to:")
2018-03-17 18:26:18 +05:30
%ul
- @pre_auth.scopes.each do |scope|
%li
%strong= t scope, scope: [:doorkeeper, :scopes]
2018-11-08 19:23:39 +05:30
.text-secondary= t scope, scope: [:doorkeeper, :scope_desc]
2018-03-17 18:26:18 +05:30
.form-actions.text-right
2019-03-02 22:35:43 +05:30
= form_tag oauth_authorization_path, method: :delete, class: 'inline' do
2018-03-17 18:26:18 +05:30
= 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
2021-03-08 18:12:59 +05:30
= hidden_field_tag :code_challenge, @pre_auth.code_challenge
= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method
2021-01-29 00:20:46 +05:30
= submit_tag _("Deny"), class: "gl-button btn btn-danger"
2018-03-17 18:26:18 +05:30
= 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
2021-03-08 18:12:59 +05:30
= hidden_field_tag :code_challenge, @pre_auth.code_challenge
= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method
2021-04-17 20:07:23 +05:30
= submit_tag _("Authorize"), class: "gl-button btn btn-confirm gl-ml-3", data: { qa_selector: 'authorization_button' }