diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-07-03 14:54:50 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-07-06 12:36:08 +0300 |
commit | 411829fdb5f24f97ce17e05f5fd018d47075b216 (patch) | |
tree | aa39d65d78e0aa719df07ab268522a5bc3cb371f /app/controllers/profiles_controller.rb | |
parent | 8ba83cbab86349c5fa5ce5034df6ffc8225f137c (diff) | |
download | gitlab-ce-411829fdb5f24f97ce17e05f5fd018d47075b216.tar.gz |
Audit log for user authentication
Diffstat (limited to 'app/controllers/profiles_controller.rb')
-rw-r--r-- | app/controllers/profiles_controller.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index b4af9e490ed..c42b2caf2b8 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -37,8 +37,11 @@ class ProfilesController < Profiles::ApplicationController redirect_to profile_account_path end - def history - @events = current_user.recent_events.page(params[:page]).per(PER_PAGE) + def audit_log + @events = AuditEvent.where(entity_type: "User", entity_id: current_user.id). + order("created_at DESC"). + page(params[:page]). + per(PER_PAGE) end def update_username |