feat(api): применены права ко всем контроллерам и методам

This commit is contained in:
Mikhail Trubnikov
2023-12-04 10:16:00 +10:00
parent e0b0297c15
commit 68e15021ec
12 changed files with 60 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using PARR.API.Contracts.V1;
using PARR.API.Contracts.V1.Requests.Queries;
@@ -6,6 +7,7 @@ using PARR.API.Contracts.V1.Responses;
using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Services.Interfaces;
using PARR.Constants;
using PARR.DAL.Contracts;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.TransformServices;
@@ -15,6 +17,7 @@ namespace PARR.API.Controllers.V1
/// <summary>
/// Выдает задания Агенту сервера
/// </summary>
[Authorize(Roles = ParrRoles.Agent.RoleOrAdmin)]
public class AgentTaskController : BaseApiController
{
private readonly IClientService clientService;