normalizar permisos y controladores
This commit is contained in:
@@ -49,7 +49,7 @@ public class DynamicAuthorizationFilter : IAsyncAuthorizationFilter
|
||||
// The permission code is expected to match the Controller Name (e.g., "Usuario", "Rol", "Colaborador")
|
||||
// In AccountController, we added claims of type "Permission" with the permission code
|
||||
var hasPermission = user.HasClaim(c => c.Type == "Permission" &&
|
||||
c.Value.Equals(controllerName, StringComparison.OrdinalIgnoreCase));
|
||||
c.Value.ToUpperInvariant().Equals(controllerName.ToUpperInvariant(), StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (!hasPermission)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user