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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
3971768a
Commit
3971768a
authored
Oct 02, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some more refactoring
parent
60a1ffee
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
33 deletions
+1
-33
app/controllers/admin/applications_controller.rb
app/controllers/admin/applications_controller.rb
+0
-1
app/controllers/oauth/applications_controller.rb
app/controllers/oauth/applications_controller.rb
+1
-1
ee/app/controllers/ee/concerns/oauth_applications.rb
ee/app/controllers/ee/concerns/oauth_applications.rb
+0
-16
ee/app/controllers/ee/oauth/applications_controller.rb
ee/app/controllers/ee/oauth/applications_controller.rb
+0
-15
No files found.
app/controllers/admin/applications_controller.rb
View file @
3971768a
class
Admin::ApplicationsController
<
Admin
::
ApplicationController
include
OauthApplications
prepend
EE
::
Admin
::
ApplicationsController
before_action
:set_application
,
only:
[
:show
,
:edit
,
:update
,
:destroy
]
before_action
:load_scopes
,
only:
[
:new
,
:create
,
:edit
,
:update
]
...
...
app/controllers/oauth/applications_controller.rb
View file @
3971768a
...
...
@@ -57,7 +57,7 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
def
application_params
super
.
tap
do
|
params
|
params
[
:owner
]
=
current_user
params
[
:
doorkeeper_application
][
:
owner
]
=
current_user
params
[
:ip_address
]
=
request
.
remote_ip
end
end
...
...
ee/app/controllers/ee/concerns/oauth_applications.rb
deleted
100644 → 0
View file @
60a1ffee
module
EE
module
Concerns
module
OauthApplications
extend
ActiveSupport
::
Concern
def
log_audit_event
::
AuditEventService
.
new
(
current_user
,
current_user
,
action: :custom
,
custom_message:
'OAuth access granted'
,
ip_address:
request
.
remote_ip
)
.
for_user
(
@application
.
name
).
security_event
end
end
end
end
ee/app/controllers/ee/oauth/applications_controller.rb
deleted
100644 → 0
View file @
60a1ffee
module
EE
module
Oauth
module
ApplicationsController
protected
def
redirect_to_oauth_application_page
raise
NotImplementedError
unless
defined?
(
super
)
log_audit_event
super
end
end
end
end
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