@foreach ($permissions as $main_section => $main_section_permission) @php // Ugh, this sucks, but we need to special case reports to map to reports.view $sectionPermission = $main_section_permission[0]; if ((str_slug($main_section)) == 'reports') { $section_name = 'reports.view'; } else { $section_name = str_slug($main_section); } @endphp @if (str_slug($main_section) == 'superuser' && !auth()->user()->isSuperUser()) @continue @endif @if (str_slug($main_section) == 'admin' && !auth()->user()->hasAccess('admin')) @continue @endif
@if (count($main_section_permission) > 2) @endif @endforeach