disabled auth for user access
This commit is contained in:
parent
6575c2f219
commit
500582020b
@ -48,7 +48,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
|
|||||||
return Unauthorized(result.ErrorMessage);
|
return Unauthorized(result.ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Authorize(Policy = "DamageApp", Roles ="admin")]
|
// [Authorize(Policy = "DamageApp", Roles ="admin")]
|
||||||
[HttpGet("users")]
|
[HttpGet("users")]
|
||||||
public async Task<ActionResult> GetUsersAsync()
|
public async Task<ActionResult> GetUsersAsync()
|
||||||
{
|
{
|
||||||
@ -60,7 +60,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
|
|||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Authorize(Policy = "DamageApp", Roles = "admin")]
|
// [Authorize(Policy = "DamageApp", Roles = "admin")]
|
||||||
[HttpGet("users/{Id}")]
|
[HttpGet("users/{Id}")]
|
||||||
public async Task<ActionResult> GetUsersAsync(int Id)
|
public async Task<ActionResult> GetUsersAsync(int Id)
|
||||||
{
|
{
|
||||||
@ -72,7 +72,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
|
|||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Authorize(Policy = "DamageApp", Roles = "admin")]
|
// [Authorize(Policy = "DamageApp", Roles = "admin")]
|
||||||
[HttpGet("roles")]
|
[HttpGet("roles")]
|
||||||
public async Task<ActionResult> GetRolesAsync()
|
public async Task<ActionResult> GetRolesAsync()
|
||||||
{
|
{
|
||||||
@ -83,7 +83,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
|
|||||||
}
|
}
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
[Authorize(Policy = "DamageApp", Roles = "admin")]
|
// [Authorize(Policy = "DamageApp", Roles = "admin")]
|
||||||
[HttpPost("users")]
|
[HttpPost("users")]
|
||||||
public async Task<ActionResult> PostUserAsync(User user)
|
public async Task<ActionResult> PostUserAsync(User user)
|
||||||
{
|
{
|
||||||
@ -95,7 +95,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
|
|||||||
return BadRequest(result.ErrorMessage);
|
return BadRequest(result.ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Authorize(Policy = "DamageApp", Roles = "admin")]
|
// [Authorize(Policy = "DamageApp", Roles = "admin")]
|
||||||
[HttpPut("users/{Id}")]
|
[HttpPut("users/{Id}")]
|
||||||
public async Task<ActionResult> PutUserAsync(int Id, User user)
|
public async Task<ActionResult> PutUserAsync(int Id, User user)
|
||||||
{
|
{
|
||||||
@ -110,7 +110,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
|
|||||||
return BadRequest(result.ErrorMessage);
|
return BadRequest(result.ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Authorize(Policy = "DamageApp", Roles = "admin")]
|
// [Authorize(Policy = "DamageApp", Roles = "admin")]
|
||||||
[HttpDelete("users/{Id}")]
|
[HttpDelete("users/{Id}")]
|
||||||
public async Task<ActionResult> DeleteUserAsync(int Id)
|
public async Task<ActionResult> DeleteUserAsync(int Id)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user