diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-08-15 13:56:24 +0200 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2019-03-14 18:16:03 +0100 |
commit | 65df88c4907195ea789bd5b35ddde1305b7c199a (patch) | |
tree | d1e4cb7784b4882f336e0268c9f64318395bfe64 /app/views/search | |
parent | 22f44b50d8ece6cdb2d83cb8e2b1c5b51f01d70d (diff) | |
download | gitlab-ce-65df88c4907195ea789bd5b35ddde1305b7c199a.tar.gz |
move ability check from service class to view
Diffstat (limited to 'app/views/search')
-rw-r--r-- | app/views/search/_category.html.haml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/views/search/_category.html.haml b/app/views/search/_category.html.haml index 79923aeeebf..e9fdf3dbbc1 100644 --- a/app/views/search/_category.html.haml +++ b/app/views/search/_category.html.haml @@ -84,8 +84,9 @@ = _("Milestones") %span.badge.badge-pill = limited_count(@search_results.limited_milestones_count) - %li{ class: active_when(@scope == 'users') } - = link_to search_filter_path(scope: 'users') do - Users - %span.badge.badge-pill - = limited_count(@search_results.limited_users_count) + - if can?(current_user, :read_users_list) + %li{ class: active_when(@scope == 'users') } + = link_to search_filter_path(scope: 'users') do + Users + %span.badge.badge-pill + = limited_count(@search_results.limited_users_count) |