Unverified Commit aafbaa63 authored by rsayannagari-nisum-com's avatar rsayannagari-nisum-com Committed by GitHub

Merge pull request #91 from nisum-inc/FEATURE/AddedAdminRole

AddedAdminRole
parents ee05934f 7c040491
...@@ -44,9 +44,13 @@ public class UserController { ...@@ -44,9 +44,13 @@ public class UserController {
public ResponseEntity<EmployeeRoles> getEmployeeRole(@RequestParam("emailId") String emailId) public ResponseEntity<EmployeeRoles> getEmployeeRole(@RequestParam("emailId") String emailId)
throws MyTimeException { throws MyTimeException {
EmployeeRoles employeesRole = userService.getEmployeesRole(emailId); EmployeeRoles employeesRole = userService.getEmployeesRole(emailId);
String roleName = roleMappingService.getEmployeeRole(employeesRole.getEmployeeId()); if (employeesRole.getRole() != null && employeesRole.getRole().equalsIgnoreCase("Admin")) {
if (roleName != null) { employeesRole.setRole("Admin");
employeesRole.setRole(roleName); } else {
String roleName = roleMappingService.getEmployeeRole(employeesRole.getEmployeeId());
if (roleName != null) {
employeesRole.setRole(roleName);
}
} }
System.out.println("emailId" + emailId + "result" + employeesRole); System.out.println("emailId" + emailId + "result" + employeesRole);
return new ResponseEntity<>(employeesRole, HttpStatus.OK); return new ResponseEntity<>(employeesRole, HttpStatus.OK);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment