public Profile getProfile() {
    String profileName = getUser().getProfile();
    if (profileName == null) {
      return null;
    }

    return securityService.getProfileByName(profileName);
  }
  public boolean support(Entity entity) {
    if ((entity instanceof Report) && ((Report) entity).getType().equals(ReportConstants.NEXT)) {
      try {
        if (securityService.hasPermissionsById(
            ServerUtil.getUsername(), PermissionUtil.getWrite(), entity.getId())) {
          DataSource ds = ((Report) entity).getDataSource();
          if (securityService.hasPermissionsById(
              ServerUtil.getUsername(), PermissionUtil.getRead(), ds.getId())) {
            return true;
          }
        }
      } catch (Exception e) {
        e.printStackTrace();
      }
    }

    return false;
  }