disabled auth for user access

This commit is contained in:
Santhosh S 2023-11-22 18:34:38 -05:00
parent 6575c2f219
commit 500582020b

View File

@ -48,7 +48,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<ActionResult> GetUsersAsync()
{
@ -60,7 +60,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
return NoContent();
}
[Authorize(Policy = "DamageApp", Roles = "admin")]
// [Authorize(Policy = "DamageApp", Roles = "admin")]
[HttpGet("users/{Id}")]
public async Task<ActionResult> GetUsersAsync(int Id)
{
@ -72,7 +72,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
return NotFound();
}
[Authorize(Policy = "DamageApp", Roles = "admin")]
// [Authorize(Policy = "DamageApp", Roles = "admin")]
[HttpGet("roles")]
public async Task<ActionResult> GetRolesAsync()
{
@ -83,7 +83,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
}
return NoContent();
}
[Authorize(Policy = "DamageApp", Roles = "admin")]
// [Authorize(Policy = "DamageApp", Roles = "admin")]
[HttpPost("users")]
public async Task<ActionResult> PostUserAsync(User user)
{
@ -95,7 +95,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<ActionResult> PutUserAsync(int Id, User user)
{
@ -110,7 +110,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<ActionResult> DeleteUserAsync(int Id)
{