From 284c5e84d324b82c948a560ea3a3dd9b5d264730 Mon Sep 17 00:00:00 2001
From: Lucca Santangelo <luccasant95@gmail.com>
Date: Sat, 7 Nov 2020 14:27:42 -0300
Subject: [PATCH] add authorization to controller

---
 Tsi1.Api/Tsi1.Api/Controllers/SectionController.cs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Tsi1.Api/Tsi1.Api/Controllers/SectionController.cs b/Tsi1.Api/Tsi1.Api/Controllers/SectionController.cs
index fec06ce..81946f2 100644
--- a/Tsi1.Api/Tsi1.Api/Controllers/SectionController.cs
+++ b/Tsi1.Api/Tsi1.Api/Controllers/SectionController.cs
@@ -1,14 +1,14 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
+using System.Collections.Generic;
 using System.Threading.Tasks;
-using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Mvc;
 using Tsi1.BusinessLayer.Dtos;
+using Tsi1.BusinessLayer.Helpers;
 using Tsi1.BusinessLayer.Interfaces;
 
 namespace Tsi1.Api.Controllers
 {
+    [Authorize(Roles = UserTypes.Professor)]
     [Route("api/[controller]")]
     [ApiController]
     public class SectionController : ControllerBase
-- 
GitLab