BigW Consortium Gitlab

applications.html.haml 2.34 KB
Newer Older
1
- page_title "Applications"
2 3 4
- header_title page_title, applications_profile_path

.gray-content-block.top-block
5
  - if user_oauth_applications?
6
    Manage applications that can use GitLab as an OAuth provider,
7 8 9
    and applications that you've authorized to use your account.
  - else
    Manage applications that you've authorized to use your account.
10

11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
- if user_oauth_applications?
  .oauth-applications
    %h3
      Your applications
      .pull-right
        = link_to 'New Application', new_oauth_application_path, class: 'btn btn-success'
    - if @applications.any?
      %table.table.table-striped
        %thead
          %tr
            %th Name
            %th Callback URL
            %th Clients
            %th
            %th
        %tbody
          - @applications.each do |application|
            %tr{:id => "application_#{application.id}"}
              %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= link_to 'Edit', edit_oauth_application_path(application), class: 'btn btn-link btn-sm'
              %td= render 'doorkeeper/applications/delete_form', application: application
36

37
.oauth-authorized-applications.prepend-top-20
38 39 40
  - if user_oauth_applications?
    %h3
      Authorized applications
41 42 43 44 45 46 47 48 49 50

  - if @authorized_tokens.any?
    %table.table.table-striped
      %thead
        %tr
          %th Name
          %th Authorized At
          %th Scope
          %th
      %tbody
51 52 53 54
        - @authorized_apps.each do |app|
          - token = app.authorized_tokens.order('created_at desc').first
          %tr{:id => "application_#{app.id}"}
            %td= app.name
55 56
            %td= token.created_at
            %td= token.scopes
57
            %td= render 'doorkeeper/authorized_applications/delete_form', application: app
58 59 60 61 62 63 64 65 66
        - @authorized_anonymous_tokens.each do |token|
          %tr
            %td
              Anonymous
              %div.help-block
                %em Authorization was granted by entering your username and password in the application.
            %td= token.created_at
            %td= token.scopes
            %td= render 'doorkeeper/authorized_applications/delete_form', token: token
67
  - else
Ben Bodenmiller committed
68
    %p.light You don't have any authorized applications