Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
d8b267db
Commit
d8b267db
authored
Jul 02, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly show anonymous authorized applications under Profile > Applications.
parent
f6fb946c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
4 deletions
+27
-4
CHANGELOG
CHANGELOG
+3
-0
app/controllers/oauth/authorized_applications_controller.rb
app/controllers/oauth/authorized_applications_controller.rb
+6
-1
app/controllers/profiles_controller.rb
app/controllers/profiles_controller.rb
+2
-1
app/views/doorkeeper/authorized_applications/_delete_form.html.haml
...doorkeeper/authorized_applications/_delete_form.html.haml
+7
-2
app/views/profiles/applications.html.haml
app/views/profiles/applications.html.haml
+9
-0
No files found.
CHANGELOG
View file @
d8b267db
...
...
@@ -10,6 +10,9 @@ v 7.13.0 (unreleased)
- Update ssl_ciphers in Nginx example to remove DHE settings. This will deny forward secrecy for Android 2.3.7, Java 6 and OpenSSL 0.9.8
- Convert CRLF newlines to LF when committing using the web editor.
v 7.12.2 (unreleased)
- Correctly show anonymous authorized applications under Profile > Applications.
v 7.12.1
- Fix error when deleting a user who has projects (Stan Hu)
- Fix post-receive errors on a push when an external issue tracker is configured (Stan Hu)
...
...
app/controllers/oauth/authorized_applications_controller.rb
View file @
d8b267db
...
...
@@ -4,7 +4,12 @@ class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicatio
layout
'profile'
def
destroy
if
params
[
:token_id
].
present?
current_resource_owner
.
oauth_authorized_tokens
.
find
(
params
[
:token_id
]).
revoke
else
Doorkeeper
::
AccessToken
.
revoke_all_for
(
params
[
:id
],
current_resource_owner
)
end
redirect_to
applications_profile_url
,
notice:
I18n
.
t
(
:notice
,
scope:
[
:doorkeeper
,
:flash
,
:authorized_applications
,
:destroy
])
end
end
app/controllers/profiles_controller.rb
View file @
d8b267db
...
...
@@ -11,7 +11,8 @@ class ProfilesController < Profiles::ApplicationController
def
applications
@applications
=
current_user
.
oauth_applications
@authorized_tokens
=
current_user
.
oauth_authorized_tokens
@authorized_apps
=
@authorized_tokens
.
map
(
&
:application
).
uniq
@authorized_anonymous_tokens
=
@authorized_tokens
.
reject
(
&
:application
)
@authorized_apps
=
@authorized_tokens
.
map
(
&
:application
).
uniq
-
[
nil
]
end
def
update
...
...
app/views/doorkeeper/authorized_applications/_delete_form.html.haml
View file @
d8b267db
-
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'
app/views/profiles/applications.html.haml
View file @
d8b267db
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment