diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-06 09:07:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-06 09:07:42 +0000 |
commit | 669c24d9276db9a73bbcea40aeab98273aae9e5e (patch) | |
tree | 9548cfccd841b4aae3703cdd1b5bf5c167d5a8dc /lib | |
parent | 13076511c60f62ce0f8baba22ca9b94755a7d3cb (diff) | |
download | gitlab-ce-669c24d9276db9a73bbcea40aeab98273aae9e5e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/helpers/internal_helpers.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/plugin.rb | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb index b719e5c0886..cc4a0d348a0 100644 --- a/lib/api/helpers/internal_helpers.rb +++ b/lib/api/helpers/internal_helpers.rb @@ -52,7 +52,7 @@ module API def log_user_activity(actor) commands = Gitlab::GitAccess::DOWNLOAD_COMMANDS - ::Users::ActivityService.new(actor, 'Git SSH').execute if commands.include?(params[:action]) + ::Users::ActivityService.new(actor).execute if commands.include?(params[:action]) end def merge_request_urls diff --git a/lib/gitlab/plugin.rb b/lib/gitlab/plugin.rb index 23353f36025..b6700f4733b 100644 --- a/lib/gitlab/plugin.rb +++ b/lib/gitlab/plugin.rb @@ -2,10 +2,16 @@ module Gitlab module Plugin + def self.any? + plugin_glob.any? { |entry| File.file?(entry) } + end + def self.files - Dir.glob(Rails.root.join('plugins/*')).select do |entry| - File.file?(entry) - end + plugin_glob.select { |entry| File.file?(entry) } + end + + def self.plugin_glob + Dir.glob(Rails.root.join('plugins/*')) end def self.execute_all_async(data) |