feat(authorization): filter tenant menus by user roles in bootstrap process

This commit is contained in:
2026-07-31 08:23:18 -03:00
parent a20b1713d3
commit a087a511e0
2 changed files with 46 additions and 1 deletions

View File

@@ -25,7 +25,10 @@ class BootstrapTenantController extends Controller
->where('dominio', $dominio)
->firstOrFail(),
[
'menues',
'menues' => fn ($query) => $query->whereHas(
'roles',
fn ($query) => $query->where('codigo', 'user')
),
'categories' => fn ($query) => $query->orderBy('nombre'),
]
)