Commit 30f99608 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Fixed some missing permission conditions

parent f4794659
- can_admin_group = can?(current_user, :admin_group, @group)
- can_edit = can?(current_user, :admin_group, @group)
= content_for :sub_nav do = content_for :sub_nav do
.scrolling-tabs-container.sub-nav-scroll .scrolling-tabs-container.sub-nav-scroll
= render 'shared/nav_scroll' = render 'shared/nav_scroll'
...@@ -8,6 +10,7 @@ ...@@ -8,6 +10,7 @@
%span %span
Projects Projects
- if can_edit && can_admin_group
= nav_link(path: 'groups#edit') do = nav_link(path: 'groups#edit') do
= link_to edit_group_path(@group), title: 'Edit Group' do = link_to edit_group_path(@group), title: 'Edit Group' do
%span %span
......
- can_admin_group = can?(current_user, :admin_group, @group) - can_admin_group = can?(current_user, :admin_group, @group)
- can_edit = can?(current_user, :admin_group, @group)
.scrolling-tabs-container{ class: nav_control_class } .scrolling-tabs-container{ class: nav_control_class }
.fade-left .fade-left
= icon('angle-left') = icon('angle-left')
...@@ -26,8 +25,7 @@ ...@@ -26,8 +25,7 @@
= link_to group_group_members_path(@group), title: 'Members' do = link_to group_group_members_path(@group), title: 'Members' do
%span %span
Members Members
- if current_user - if current_user && can_admin_group
- if can_admin_group || can_edit
= nav_link(path: %w[groups#projects groups#edit]) do = nav_link(path: %w[groups#projects groups#edit]) do
= link_to projects_group_path(@group), title: 'Settings' do = link_to projects_group_path(@group), title: 'Settings' do
%span %span
......
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