|
|
@@ -302,20 +302,17 @@ public class NoticeManage { |
|
|
|
notice.setPermissionsValue(user.getEmpPosUnitCode()); |
|
|
|
return; |
|
|
|
} |
|
|
|
for(Role role : userRoleList){ |
|
|
|
if(RoleEnum.SUPER_ADMIN.eq(role.getCode())){ |
|
|
|
notice.setPermissions(NoticePermissionsEnum.SUPER.getCode()); |
|
|
|
return; |
|
|
|
}else if(RoleEnum.REGION_MANAGER.eq(role.getCode())){ |
|
|
|
notice.setPermissions(NoticePermissionsEnum.REGION.getCode()); |
|
|
|
notice.setPermissionsValue(user.getRegionCode()); |
|
|
|
return; |
|
|
|
}else if(RoleEnum.COMPANY_MANAGER.eq(role.getCode())){ |
|
|
|
notice.setPermissions(NoticePermissionsEnum.ORG.getCode()); |
|
|
|
notice.setPermissionsValue(user.getEmpPosUnitCode()); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if(user.getSuperAdmin()){ |
|
|
|
notice.setPermissions(NoticePermissionsEnum.SUPER.getCode()); |
|
|
|
return; |
|
|
|
}else if(user.getRegionAdmin()){ |
|
|
|
notice.setPermissions(NoticePermissionsEnum.REGION.getCode()); |
|
|
|
notice.setPermissionsValue(user.getRegionCode()); |
|
|
|
return; |
|
|
|
}else if(user.getIsOrgAdmin()){ |
|
|
|
notice.setPermissions(NoticePermissionsEnum.ORG.getCode()); |
|
|
|
notice.setPermissionsValue(user.getEmpPosUnitCode()); |
|
|
|
return; |
|
|
|
} |
|
|
|
notice.setPermissions(NoticePermissionsEnum.ORG.getCode()); |
|
|
|
notice.setPermissionsValue(user.getEmpPosUnitCode()); |
|
|
|