feat(api): применены права ко всем контроллерам и методам
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using AutoMapper;
|
||||
using FluentValidation;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.API.Contracts.V1;
|
||||
@@ -10,12 +11,14 @@ using PARR.API.Contracts.V1.Responses.Base;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.API.Extensions;
|
||||
using PARR.API.Services.Interfaces;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
[Authorize(Roles = ParrRoles.EsppRobot.RoleOrAdmin)]
|
||||
public class RobotHistoryController : BaseApiController
|
||||
{
|
||||
private readonly IValidator<RobotHistoryRequest> validator;
|
||||
@@ -54,7 +57,7 @@ namespace PARR.API.Controllers.V1
|
||||
|
||||
IQueryable<RobotHistory> query = robotHistoryService.Get()
|
||||
.Include(t => t.RobotConfiguration)
|
||||
.ThenInclude(t=>t!.Template)
|
||||
.ThenInclude(t => t!.Template)
|
||||
.Include(t => t.RobotHistoryLevel)
|
||||
.Include(t => t.StatusTask)
|
||||
.OrderByDescending(t => t.DateCreated);
|
||||
|
||||
Reference in New Issue
Block a user