From 6f5e0ba0f5daeefa23fc20bda9df17bbca52a309 Mon Sep 17 00:00:00 2001 From: CarlosPavajeau Date: Fri, 28 May 2021 10:26:00 -0500 Subject: [PATCH] feat(back-end): allow only the administrator to register other employees --- Kaizen/Controllers/EmployeesController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Kaizen/Controllers/EmployeesController.cs b/Kaizen/Controllers/EmployeesController.cs index 88a9da7b..9d5cd0ce 100644 --- a/Kaizen/Controllers/EmployeesController.cs +++ b/Kaizen/Controllers/EmployeesController.cs @@ -136,6 +136,7 @@ public async Task> PutEmployee(string id, Employ } [HttpPost] + [Authorize(Roles = "Administrator")] public async Task> PostEmployee(EmployeeInputModel employeeModel) { EmployeeCharge employeeCharge = await _employeesRepository.GetAllEmployeeCharges()