Set OperateMachines policy at controller level
parent
c94acf9ba4
commit
f1a7056f18
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace NetworkResurrector.Api.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
[Authorize(Policy = Policies.OperateMachines)]
|
||||
[ApiController]
|
||||
[Route("resurrector")]
|
||||
public class ResurrectorController : ControllerBase
|
||||
|
@ -27,7 +27,6 @@ namespace NetworkResurrector.Api.Controllers
|
|||
}
|
||||
|
||||
[HttpPost("ping")]
|
||||
[Authorize(Policy = Policies.OperateMachines)]
|
||||
public async Task<IActionResult> PingMachine([FromBody] PingMachine pingMachine)
|
||||
{
|
||||
var result = await _mediator.Send(pingMachine);
|
||||
|
|
Loading…
Reference in New Issue