diff options
author | James Lopez <james@jameslopez.es> | 2016-11-25 19:10:25 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-04-14 16:20:55 +0300 |
commit | 3cb84e06b7a118fb46b4e1e0d4885026c9d4a4d1 (patch) | |
tree | ef622687724fd429f6f7fb02a19a022550bf8608 /lib/api/helpers | |
parent | 2951a8543ef97ceb1bcaca5f5140d822729c950b (diff) |
Remove user activities table and use redis instead of PG for recording activities
Refactored specs and added a post deployment migration to remove the activity users table.
Diffstat (limited to 'lib/api/helpers')
-rw-r--r-- | lib/api/helpers/internal_helpers.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb index 810e5063996..8f25bcf2f54 100644 --- a/lib/api/helpers/internal_helpers.rb +++ b/lib/api/helpers/internal_helpers.rb @@ -60,6 +60,13 @@ module API rescue JSON::ParserError {} end + + def log_user_activity(actor) + commands = Gitlab::GitAccess::DOWNLOAD_COMMANDS + + Gitlab::GitAccess::GIT_ANNEX_COMMANDS + + ::Users::ActivityService.new(actor, 'Git SSH').execute if commands.include?(params[:action]) + end end end end |