diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-12-18 11:35:54 +0300 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2019-03-14 20:21:03 +0300 |
commit | b4437cfaecfcd0f48079a2027920e828ea1c7e48 (patch) | |
tree | f0e1792e375cfd466291a09ae444c76b43cbec10 /app/helpers | |
parent | db0cf709703f0cc344351d2a8fd28d7d51046296 (diff) |
use project_search_tabs? for user search check
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/projects_helper.rb | 3 | ||||
-rw-r--r-- | app/helpers/search_helper.rb | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 2ac8ddc5244..5496aa4908c 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -364,7 +364,8 @@ module ProjectsHelper blobs: :download_code, commits: :download_code, merge_requests: :read_merge_request, - notes: [:read_merge_request, :download_code, :read_issue, :read_project_snippet] + notes: [:read_merge_request, :download_code, :read_issue, :read_project_snippet], + members: :read_project_member ) end 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 |