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
c7cbcd00
Commit
c7cbcd00
authored
Sep 18, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor/fix keys controller code
parent
1c278fd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
app/controllers/concerns/oauth_applications.rb
app/controllers/concerns/oauth_applications.rb
+9
-0
app/models/key.rb
app/models/key.rb
+0
-2
No files found.
app/controllers/concerns/oauth_applications.rb
View file @
c7cbcd00
...
@@ -16,4 +16,13 @@ module OauthApplications
...
@@ -16,4 +16,13 @@ module OauthApplications
def
load_scopes
def
load_scopes
@scopes
=
Doorkeeper
.
configuration
.
scopes
@scopes
=
Doorkeeper
.
configuration
.
scopes
end
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
end
app/models/key.rb
View file @
c7cbcd00
...
@@ -28,8 +28,6 @@ class Key < ActiveRecord::Base
...
@@ -28,8 +28,6 @@ class Key < ActiveRecord::Base
delegate
:name
,
:email
,
to: :user
,
prefix:
true
delegate
:name
,
:email
,
to: :user
,
prefix:
true
alias_attribute
:full_path
,
:title
after_commit
:add_to_shell
,
on: :create
after_commit
:add_to_shell
,
on: :create
after_create
:post_create_hook
after_create
:post_create_hook
after_commit
:remove_from_shell
,
on: :destroy
after_commit
:remove_from_shell
,
on: :destroy
...
...
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