2018-11-18 11:00:15 +05:30
|
|
|
- page_title _("Applications")
|
2017-09-10 17:25:29 +05:30
|
|
|
- @content_class = "limit-container-width" unless fluid_layout
|
2015-11-26 14:37:03 +05:30
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
.row.gl-mt-3
|
2017-09-10 17:25:29 +05:30
|
|
|
.col-lg-4.profile-settings-sidebar
|
2020-06-23 00:09:42 +05:30
|
|
|
%h4.gl-mt-0
|
2016-06-02 11:05:42 +05:30
|
|
|
= page_title
|
|
|
|
%p
|
|
|
|
- if user_oauth_applications?
|
2018-11-18 11:00:15 +05:30
|
|
|
= _("Manage applications that can use GitLab as an OAuth provider, and applications that you've authorized to use your account.")
|
2016-06-02 11:05:42 +05:30
|
|
|
- else
|
2018-11-18 11:00:15 +05:30
|
|
|
= _("Manage applications that you've authorized to use your account.")
|
2017-09-10 17:25:29 +05:30
|
|
|
.col-lg-8
|
2016-06-02 11:05:42 +05:30
|
|
|
- if user_oauth_applications?
|
2020-06-23 00:09:42 +05:30
|
|
|
%h5.gl-mt-0
|
2018-11-18 11:00:15 +05:30
|
|
|
= _('Add new application')
|
2016-06-02 11:05:42 +05:30
|
|
|
= render 'form', application: @application
|
|
|
|
%hr
|
2018-12-05 23:21:45 +05:30
|
|
|
- else
|
|
|
|
.bs-callout.bs-callout-disabled
|
|
|
|
= _('Adding new applications is disabled in your GitLab instance. Please contact your GitLab administrator to get the permission')
|
2016-06-02 11:05:42 +05:30
|
|
|
- if user_oauth_applications?
|
|
|
|
.oauth-applications
|
|
|
|
%h5
|
2018-11-18 11:00:15 +05:30
|
|
|
= _("Your applications (%{size})") % { size: @applications.size }
|
2016-06-02 11:05:42 +05:30
|
|
|
- if @applications.any?
|
|
|
|
.table-responsive
|
|
|
|
%table.table
|
|
|
|
%thead
|
|
|
|
%tr
|
2018-11-18 11:00:15 +05:30
|
|
|
%th= _('Name')
|
|
|
|
%th= _('Callback URL')
|
|
|
|
%th= _('Clients')
|
2016-06-02 11:05:42 +05:30
|
|
|
%th.last-heading
|
|
|
|
%tbody
|
|
|
|
- @applications.each do |application|
|
2017-08-17 22:00:37 +05:30
|
|
|
%tr{ id: "application_#{application.id}" }
|
2016-06-02 11:05:42 +05:30
|
|
|
%td= link_to application.name, oauth_application_path(application)
|
|
|
|
%td
|
|
|
|
- application.redirect_uri.split.each do |uri|
|
|
|
|
%div= uri
|
|
|
|
%td= application.access_tokens.count
|
|
|
|
%td
|
2020-07-28 23:09:34 +05:30
|
|
|
= link_to edit_oauth_application_path(application), class: "btn btn-transparent gl-mr-2" do
|
2016-06-02 11:05:42 +05:30
|
|
|
%span.sr-only
|
2018-11-18 11:00:15 +05:30
|
|
|
= _('Edit')
|
2020-10-24 23:57:45 +05:30
|
|
|
= sprite_icon('pencil')
|
2016-06-02 11:05:42 +05:30
|
|
|
= render 'delete_form', application: application, small: true
|
|
|
|
- else
|
|
|
|
.settings-message.text-center
|
2018-11-18 11:00:15 +05:30
|
|
|
= _("You don't have any applications")
|
2020-07-28 23:09:34 +05:30
|
|
|
.oauth-authorized-applications.prepend-top-20.gl-mb-3
|
2016-06-02 11:05:42 +05:30
|
|
|
- if user_oauth_applications?
|
|
|
|
%h5
|
2019-07-07 11:18:12 +05:30
|
|
|
= _("Authorized applications (%{size})") % { size: @authorized_apps.size + @authorized_anonymous_tokens.size }
|
2016-06-02 11:05:42 +05:30
|
|
|
|
|
|
|
- if @authorized_tokens.any?
|
|
|
|
.table-responsive
|
|
|
|
%table.table.table-striped
|
|
|
|
%thead
|
|
|
|
%tr
|
2018-11-18 11:00:15 +05:30
|
|
|
%th= _('Name')
|
|
|
|
%th= _('Authorized At')
|
|
|
|
%th= _('Scope')
|
2016-06-02 11:05:42 +05:30
|
|
|
%th
|
|
|
|
%tbody
|
|
|
|
- @authorized_apps.each do |app|
|
2018-12-05 23:21:45 +05:30
|
|
|
- token = app.authorized_tokens.order('created_at desc').first # rubocop: disable CodeReuse/ActiveRecord
|
2017-08-17 22:00:37 +05:30
|
|
|
%tr{ id: "application_#{app.id}" }
|
2016-06-02 11:05:42 +05:30
|
|
|
%td= app.name
|
|
|
|
%td= token.created_at
|
|
|
|
%td= token.scopes
|
|
|
|
%td= render 'doorkeeper/authorized_applications/delete_form', application: app
|
|
|
|
- @authorized_anonymous_tokens.each do |token|
|
|
|
|
%tr
|
|
|
|
%td
|
2018-11-18 11:00:15 +05:30
|
|
|
= _('Anonymous')
|
2018-11-08 19:23:39 +05:30
|
|
|
.form-text.text-muted
|
2018-11-18 11:00:15 +05:30
|
|
|
%em= _("Authorization was granted by entering your username and password in the application.")
|
2016-06-02 11:05:42 +05:30
|
|
|
%td= token.created_at
|
|
|
|
%td= token.scopes
|
|
|
|
%td= render 'doorkeeper/authorized_applications/delete_form', token: token
|
|
|
|
- else
|
|
|
|
.settings-message.text-center
|
2018-11-18 11:00:15 +05:30
|
|
|
= _("You don't have any authorized applications")
|