Admin cannot block employee if it is admin too
This commit is contained in:
parent
e6c0ba5c67
commit
df66398b9e
@ -67,7 +67,9 @@ public class AdminController {
|
|||||||
throw new EmployeeNotFoundException();
|
throw new EmployeeNotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (("" + employee.get().getRole()).equals("ADMIN")) {
|
||||||
|
throw new EmployeeIsAdminException();
|
||||||
|
}
|
||||||
|
|
||||||
employeeService.block(employee.get().getId());
|
employeeService.block(employee.get().getId());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user