Commit 3e97de83 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Hide search panel for group page if you dont have access

parent db197aa6
- unless can?(current_user, :read_group, @group)
- @disable_search_panel = true
= content_for :meta_tags do
- if current_user
= auto_discovery_link_tag(:atom, group_url(@group, format: :atom, private_token: current_user.private_token), title: "#{@group.name} activity")
......
......@@ -7,8 +7,9 @@
.navbar-collapse.collapse
%ul.nav.navbar-nav.pull-right
%li.hidden-sm.hidden-xs
= render 'layouts/search'
- unless @disable_search_panel
%li.hidden-sm.hidden-xs
= render 'layouts/search'
%li.visible-sm.visible-xs
= link_to search_path, title: 'Search', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('search')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment