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
f5a69b09
Commit
f5a69b09
authored
Sep 22, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor oauth applications
parent
fcb8fb1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
app/controllers/concerns/oauth_applications.rb
app/controllers/concerns/oauth_applications.rb
+1
-9
ee/app/controllers/ee/concerns/oauth_applications.rb
ee/app/controllers/ee/concerns/oauth_applications.rb
+14
-0
No files found.
app/controllers/concerns/oauth_applications.rb
View file @
f5a69b09
module
OauthApplications
extend
ActiveSupport
::
Concern
prepend
::
EE
::
OauthApplications
included
do
before_action
:prepare_scopes
,
only:
[
:create
,
:update
]
...
...
@@ -16,13 +17,4 @@ module OauthApplications
def
load_scopes
@scopes
=
Doorkeeper
.
configuration
.
scopes
end
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
ee/app/controllers/ee/concerns/oauth_applications.rb
0 → 100644
View file @
f5a69b09
module
EE
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
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