diff --git a/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/ManagerAccountServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/ManagerAccountServiceImpl.java index adf5d191f..9708e6b27 100644 --- a/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/ManagerAccountServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/ManagerAccountServiceImpl.java @@ -57,7 +57,7 @@ public class ManagerAccountServiceImpl implements ManagerAccountsService { @Override public void saveManager(ManagerInfo manager, JSONObject loginManager) { - if (!ManagerRole.ADMIN.hasRole(loginManager.getIntValue("role")) && !ManagerRole.BD_USER.hasRole(loginManager.getIntValue("role"))) { + if (!ManagerRole.ADMIN.hasRole(loginManager.getIntValue("role"))) { if (manager.isAdmin() || manager.isFinacial() || manager.isOperator() || manager.isServant() || manager.isSitemanager() || manager.isDeveloper()) { throw new BadRequestException("Invalid Role"); } @@ -77,7 +77,7 @@ public class ManagerAccountServiceImpl implements ManagerAccountsService { throw new NotFoundException("manager not exists or invalid"); } JSONObject obj = manager.accountJson(false); - if (!ManagerRole.ADMIN.hasRole(loginManager.getIntValue("role")) && !ManagerRole.BD_USER.hasRole(loginManager.getIntValue("role"))) { + if (!ManagerRole.ADMIN.hasRole(loginManager.getIntValue("role"))) { if (managerFromDb.getIntValue("org_id") != loginManager.getIntValue("org_id")) { throw new BadRequestException("You cannot modify accounts belong to other organizations"); } @@ -93,7 +93,7 @@ public class ManagerAccountServiceImpl implements ManagerAccountsService { @Override public void disable(String userId, JSONObject loginManager) { JSONObject manager = managerMapper.findById(userId); - if (!ManagerRole.ADMIN.hasRole(loginManager.getIntValue("role")) && !ManagerRole.BD_USER.hasRole(loginManager.getIntValue("role"))){ + if (!ManagerRole.ADMIN.hasRole(loginManager.getIntValue("role"))){ if (manager.getIntValue("org_id") != loginManager.getIntValue("org_id")) { throw new BadRequestException("You cannot disable accounts belong to other organizations"); }