diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-07-02 11:53:31 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-07-02 11:53:31 +0200 |
commit | cd5e79e98b7f08a6fa6999d25e158073fee03048 (patch) | |
tree | 6b044412b1285a8bf2e98c52e13c3607f3ad27e8 /app/views | |
parent | 2cbf45282168938696867072cb3e35131bc44a93 (diff) | |
download | gitlab-ce-cd5e79e98b7f08a6fa6999d25e158073fee03048.tar.gz |
Correctly show anonymous authorized applications under Profile > Applications.
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/doorkeeper/authorized_applications/_delete_form.html.haml | 9 | ||||
-rw-r--r-- | app/views/profiles/applications.html.haml | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/app/views/doorkeeper/authorized_applications/_delete_form.html.haml b/app/views/doorkeeper/authorized_applications/_delete_form.html.haml index 4bba72167e3..bfa95ce79a7 100644 --- a/app/views/doorkeeper/authorized_applications/_delete_form.html.haml +++ b/app/views/doorkeeper/authorized_applications/_delete_form.html.haml @@ -1,4 +1,9 @@ - submit_btn_css ||= 'btn btn-link btn-remove' -= form_tag oauth_authorized_application_path(application) do +- if defined?(token) + - path = oauth_authorized_application_path(0, token_id: token) +- else + - path = oauth_authorized_application_path(application) + += form_tag path do %input{:name => "_method", :type => "hidden", :value => "delete"}/ - = submit_tag 'Revoke', onclick: "return confirm('Are you sure?')", class: 'btn btn-link btn-remove btn-sm'
\ No newline at end of file + = submit_tag 'Revoke', onclick: "return confirm('Are you sure?')", class: 'btn btn-link btn-remove btn-sm' diff --git a/app/views/profiles/applications.html.haml b/app/views/profiles/applications.html.haml index 2c4f0804f0b..d2fad31eca2 100644 --- a/app/views/profiles/applications.html.haml +++ b/app/views/profiles/applications.html.haml @@ -56,5 +56,14 @@ %td= token.created_at %td= token.scopes %td= render 'doorkeeper/authorized_applications/delete_form', application: app + - @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 - else %p.light You dont have any authorized applications |