Commit a5e4e9cd authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Fixed some missing permissions conditions, as well as haml formatting

parent d2297a30
......@@ -9,26 +9,31 @@
= link_to projects_group_path(@group), title: 'Projects' do
%span
Projects
- if can_edit
- if ldap_enabled?
= nav_link(path: 'ldap_group_links#index') do
= link_to group_ldap_group_links_path(@group), title: 'LDAP Group' do
%span
LDAP Group
= nav_link(path: 'hooks#index') do
= link_to group_hooks_path(@group), title: 'Webhooks' do
%span
Webhooks
= nav_link(path: 'audit_events#index') do
= link_to group_audit_events_path(@group), title: 'Audit Events' do
%span
Audit Events
- if @group.shared_runners_enabled? && @group.shared_runners_minutes_limit_enabled?
= nav_link(path: 'pipeline_quota#index') do
= link_to group_audit_events_path(@group), title: 'Pipelines quota' do
%span
Pipelines quota
= nav_link(path: 'groups#edit') do
= link_to edit_group_path(@group), title: 'Edit Group' do
%span
Edit Group
- if ldap_enabled?
= nav_link(path: 'ldap_group_links#index') do
= link_to group_ldap_group_links_path(@group), title: 'LDAP Group' do
%span
LDAP Group
= nav_link(path: 'hooks#index') do
= link_to group_hooks_path(@group), title: 'Webhooks' do
%span
Webhooks
= nav_link(path: 'audit_events#index') do
= link_to group_audit_events_path(@group), title: 'Audit Events' do
%span
Audit Events
- if @group.shared_runners_enabled? && @group.shared_runners_minutes_limit_enabled?
= nav_link(path: 'pipeline_quota#index') do
= link_to group_audit_events_path(@group), title: 'Pipelines quota' do
%span
Pipelines quota
- if can_edit && can_admin_group
= nav_link(path: 'groups#edit') do
= link_to edit_group_path(@group), title: 'Edit Group' do
%span
Edit 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 }
.fade-left
= icon('angle-left')
......@@ -30,9 +29,8 @@
= link_to group_analytics_path(@group), title: 'Contribution Analytics', data: {placement: 'right'} do
%span
Contribution Analytics
- if current_user
- if can_admin_group || can_edit
= nav_link(path: %w[groups#projects groups#edit ldap_group_links#index hooks#index audit_events#index pipeline_quota#index]) do
= link_to projects_group_path(@group), title: 'Settings' do
%span
Settings
- if current_user && can_admin_group
= nav_link(path: %w[groups#projects groups#edit ldap_group_links#index hooks#index audit_events#index pipeline_quota#index]) do
= link_to projects_group_path(@group), title: 'Settings' do
%span
Settings
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