Пример #1
0
 @Override
 public List<User> getUserLisOfCorp(int corpId) {
   List<User> list = organizationDao.getUserLisOfCorp(corpId);
   Corporation c = getCorporation(corpId);
   User u = accountMgr.getUser(c.getUserId());
   list.add(u);
   for (User user : list) {
     int roleId = getUserRoleInCorp(user.getId(), corpId);
     if (user.isAdmin()) {
       roleId = 1; // user is the RAP platform admin
     } else if (user.getId() == c.getUserId()) {
       roleId = 1; // user is the author
     }
     user.setRoleId(roleId);
   }
   return list;
 }