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:
authorAlexis Reigel <alexis.reigel.ext@siemens.com>2018-12-18 11:35:54 +0300
committerAlexis Reigel <alexis.reigel.ext@siemens.com>2019-03-14 20:21:03 +0300
commitb4437cfaecfcd0f48079a2027920e828ea1c7e48 (patch)
treef0e1792e375cfd466291a09ae444c76b43cbec10 /app/helpers/search_helper.rb
parentdb0cf709703f0cc344351d2a8fd28d7d51046296 (diff)
use project_search_tabs? for user search check
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r--app/helpers/search_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index 0ee76a51f7d..97fcb200c67 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -201,4 +201,12 @@ module SearchHelper
def limited_count(count, limit = 1000)
count > limit ? "#{limit}+" : count
end
+
+ def search_tabs?(tab)
+ if @project
+ project_search_tabs?(:members)
+ else
+ can?(current_user, :read_users_list)
+ end
+ end
end