Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-07-06 13:09:53 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-07-06 13:09:53 +0300
commitf3590c83ea52971f2c30534952ea4d1fd6fc1b81 (patch)
tree00609053c12c960dd645ecad45dcaae2f58d5f9d /app/controllers/profiles_controller.rb
parent5f52d6a038dc64db42d137aa83b3c104766c7098 (diff)
parent411829fdb5f24f97ce17e05f5fd018d47075b216 (diff)
Merge branch 'audit_log' into 'master'
Audit log for user authentication https://dev.gitlab.org/gitlab/gitlabhq/issues/2318 See merge request !931
Diffstat (limited to 'app/controllers/profiles_controller.rb')
-rw-r--r--app/controllers/profiles_controller.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 5382a6cf6ac..26a4de15462 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -38,8 +38,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