Commit c7cbcd00 authored by James Lopez's avatar James Lopez

refactor/fix keys controller code

parent 1c278fd9
......@@ -16,4 +16,13 @@ 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
......@@ -28,8 +28,6 @@ class Key < ActiveRecord::Base
delegate :name, :email, to: :user, prefix: true
alias_attribute :full_path, :title
after_commit :add_to_shell, on: :create
after_create :post_create_hook
after_commit :remove_from_shell, on: :destroy
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment