This commit is contained in:
Lizandro Guarnizo
2026-05-04 22:22:25 -05:00
parent 4913fdf984
commit 7f3fdfb4be
2 changed files with 34 additions and 10 deletions
+5
View File
@@ -82,6 +82,11 @@ func MenuMiddleware(c *fiber.Ctx) error {
// Opcional: adjuntar la lista de URLs al contexto
c.Locals("urls", urls)
// Los administradores tienen acceso a todas las rutas
if user.IsAdmin {
return c.Next()
}
// Verificar si la URL de la solicitud está en la lista de URLs permitidas
requestURL := c.Path()