diff --git a/DamageAssesmentApi/DamageAssesment.Api.Employees/Controllers/EmployeesController.cs b/DamageAssesmentApi/DamageAssesment.Api.Employees/Controllers/EmployeesController.cs index 7ba9f56..f247d17 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Employees/Controllers/EmployeesController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Employees/Controllers/EmployeesController.cs @@ -19,7 +19,7 @@ namespace DamageAssesment.Api.Employees.Controllers /// /// GET request for retrieving employees. /// - // [Authorize(Roles = "admin")] + [Authorize(Roles = "admin")] [HttpGet("employees")] public async Task GetEmployeesAsync() { @@ -36,7 +36,7 @@ namespace DamageAssesment.Api.Employees.Controllers /// /// GET request for retrieving an employee by ID. /// - // [Authorize(Roles = "admin")] + [Authorize(Roles = "admin")] [HttpGet("employees/{id}")] public async Task GetEmployeeByIdAsync(int id) { diff --git a/DamageAssesmentApi/DamageAssesment.Api.UsersAccess/Controllers/UsersAccessController.cs b/DamageAssesmentApi/DamageAssesment.Api.UsersAccess/Controllers/UsersAccessController.cs index 5e4271c..7449d7e 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.UsersAccess/Controllers/UsersAccessController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.UsersAccess/Controllers/UsersAccessController.cs @@ -37,7 +37,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers return Unauthorized(result.ErrorMessage); } - // [Authorize(Policy = "Dadeschools")] + // [Authorize(Policy = "Dadeschools")] [HttpPost("refreshtoken")] public async Task RefreshTokenAsync(TokenResponse tokenResponse) { @@ -49,7 +49,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers return Unauthorized(result.ErrorMessage); } - // [Authorize(Policy = "DamageApp", Roles ="admin")] + [Authorize(Policy = "DamageApp", Roles = "admin")] [HttpGet("users")] public async Task GetUsersAsync() { @@ -61,7 +61,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers return NoContent(); } - // [Authorize(Policy = "DamageApp", Roles = "admin")] + [Authorize(Policy = "DamageApp", Roles = "admin")] [HttpGet("users/{Id}")] public async Task GetUsersAsync(int Id) { @@ -73,7 +73,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers return NotFound(); } - // [Authorize(Policy = "DamageApp", Roles = "admin")] + [Authorize(Policy = "DamageApp", Roles = "admin")] [HttpGet("roles")] public async Task GetRolesAsync() { @@ -84,7 +84,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers } return NoContent(); } - // [Authorize(Policy = "DamageApp", Roles = "admin")] + [Authorize(Policy = "DamageApp", Roles = "admin")] [HttpPost("users")] public async Task PostUserAsync(User user) { @@ -96,7 +96,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers return BadRequest(result.ErrorMessage); } - // [Authorize(Policy = "DamageApp", Roles = "admin")] + [Authorize(Policy = "DamageApp", Roles = "admin")] [HttpPut("users/{Id}")] public async Task PutUserAsync(int Id, User user) { @@ -111,7 +111,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers return BadRequest(result.ErrorMessage); } - // [Authorize(Policy = "DamageApp", Roles = "admin")] + [Authorize(Policy = "DamageApp", Roles = "admin")] [HttpDelete("users/{Id}")] public async Task DeleteUserAsync(int Id) {