@php $acl = $node['__acl'] ?? []; $children = $node['__children'] ?? []; $hasChildren = !empty($children); $secuGroups = array_filter($acl, fn($e) => str_starts_with($e->principal, 'SECU-')); $directUsers = array_filter($acl, fn($e) => !str_starts_with($e->principal, 'SECU-') && !$e->est_herite); @endphp
@if($hasChildren) @else ● @endif {{ $name }} @if(count($secuGroups) > 0) {{ count($secuGroups) }} groupe(s) @endif @if(count($directUsers) > 0) {{ count($directUsers) }} direct(s) @endif
@if(!empty($acl))
@foreach($acl as $entry) @endforeach
Principal Type Droits Hérité
{{ $entry->principal }} @if($entry->email) {{ $entry->email }} @endif {{ $entry->type ?? '—' }} {{ $entry->droits }} {{ $entry->est_herite ? 'Oui' : 'Non' }}
@endif @if($hasChildren)
@foreach($children as $cName => $cNode) @include('permissions._tree_node', ['name' => $cName, 'node' => $cNode, 'depth' => $depth + 1]) @endforeach
@endif