From 2ece74d717e7af5cb6d7f7191e7fc362a1da434e Mon Sep 17 00:00:00 2001 From: Felix Morales Date: Thu, 24 Aug 2023 16:02:12 -0500 Subject: [PATCH] fix, agregar encabezado de autorizacion faltante en los controllers --- Controllers/ClientesController.cs | 2 ++ Controllers/Corresponsalias/CatMediosEmbarquesController.cs | 1 + Controllers/Corresponsalias/CatTiposEmbarqueController.cs | 2 +- Controllers/Corresponsalias/CuentasComplementariasController.cs | 1 + Controllers/Dashboard/CorresponsalesController.cs | 2 +- Controllers/FileManagerController.cs | 2 +- Controllers/PerfilesController.cs | 2 ++ Controllers/UsuariosController.cs | 2 ++ 8 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Controllers/ClientesController.cs b/Controllers/ClientesController.cs index 48d6746..3dc9648 100644 --- a/Controllers/ClientesController.cs +++ b/Controllers/ClientesController.cs @@ -2,10 +2,12 @@ using CORRESPONSALBackend.Contracts; using CORRESPONSALBackend.DTO.Cliente; using CORRESPONSALBackend.DTO.Usuario; using CORRESPONSALBackend.Models; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace CORRESPONSALBackend.Controllers { + [Authorize] [Route("api/[controller]")] public class ClientesController : Controller { diff --git a/Controllers/Corresponsalias/CatMediosEmbarquesController.cs b/Controllers/Corresponsalias/CatMediosEmbarquesController.cs index 112268c..995302a 100644 --- a/Controllers/Corresponsalias/CatMediosEmbarquesController.cs +++ b/Controllers/Corresponsalias/CatMediosEmbarquesController.cs @@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Mvc; namespace CORRESPONSALBackend.Controllers.Corresponsalias { + [Authorize] [ApiController] [Route("api/Corresponsalias/[controller]")] public class CatMediosEmbarquesController : Controller diff --git a/Controllers/Corresponsalias/CatTiposEmbarqueController.cs b/Controllers/Corresponsalias/CatTiposEmbarqueController.cs index 824713d..338a71e 100644 --- a/Controllers/Corresponsalias/CatTiposEmbarqueController.cs +++ b/Controllers/Corresponsalias/CatTiposEmbarqueController.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Mvc; namespace CORRESPONSALBackend.Controllers.Corresponsalias { - // [Authorize] + [Authorize] [ApiController] [Route("api/Corresponsalias/[controller]")] public class CatTiposEmbarqueController : ControllerBase diff --git a/Controllers/Corresponsalias/CuentasComplementariasController.cs b/Controllers/Corresponsalias/CuentasComplementariasController.cs index e52edd7..299324a 100644 --- a/Controllers/Corresponsalias/CuentasComplementariasController.cs +++ b/Controllers/Corresponsalias/CuentasComplementariasController.cs @@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Authorization; namespace CORRESPONSALBackend.Controllers.Corresponsalias { + [Authorize] [ApiController] [Route("api/Corresponsalias/[controller]")] public class CuentasComplementariasController : ControllerBase diff --git a/Controllers/Dashboard/CorresponsalesController.cs b/Controllers/Dashboard/CorresponsalesController.cs index c6fe38d..e50ee23 100644 --- a/Controllers/Dashboard/CorresponsalesController.cs +++ b/Controllers/Dashboard/CorresponsalesController.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Authorization; namespace CORRESPONSALBackend.Controllers.Dashboard { - // [Authorize] + [Authorize] [Route("api/Dashboard/[controller]")] [ApiController] public class CorresponsalesController : ControllerBase diff --git a/Controllers/FileManagerController.cs b/Controllers/FileManagerController.cs index 28206e4..64b7955 100644 --- a/Controllers/FileManagerController.cs +++ b/Controllers/FileManagerController.cs @@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Authorization; namespace CORRESPONSALBackend.Controllers { - // [Authorize] + [Authorize] [Route("api/[controller]")] // [ApiController] public class FileManagerController : Controller diff --git a/Controllers/PerfilesController.cs b/Controllers/PerfilesController.cs index 83a84aa..0684398 100644 --- a/Controllers/PerfilesController.cs +++ b/Controllers/PerfilesController.cs @@ -2,10 +2,12 @@ using CORRESPONSALBackend.Contracts; using CORRESPONSALBackend.DTO; using CORRESPONSALBackend.DTO.Usuario; using CORRESPONSALBackend.Models; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace CORRESPONSALBackend.Controllers { + [Authorize] [Route("api/[controller]")] [ApiController] public class PerfilesController : ControllerBase diff --git a/Controllers/UsuariosController.cs b/Controllers/UsuariosController.cs index 1366ced..c4eb29f 100644 --- a/Controllers/UsuariosController.cs +++ b/Controllers/UsuariosController.cs @@ -3,9 +3,11 @@ using CORRESPONSALBackend.DTO; using CORRESPONSALBackend.Models; using Microsoft.AspNetCore.Mvc; using CORRESPONSALBackend.DTO.Usuario; +using Microsoft.AspNetCore.Authorization; namespace CORRESPONSALBackend.Controllers { + [Authorize] [Route("api/[controller]")] [ApiController] public class UsuariosController : ControllerBase