protected Any<?> update(final Any<?> any, final Boolean enabled) {
    boolean changepwd;
    Collection<String> resourceNames;
    if (any instanceof User) {
      changepwd = true;
      resourceNames = userDAO.findAllResourceNames((User) any);
    } else if (any instanceof AnyObject) {
      changepwd = false;
      resourceNames = anyObjectDAO.findAllResourceNames((AnyObject) any);
    } else {
      changepwd = false;
      resourceNames = ((Group) any).getResourceNames();
    }

    List<String> noPropResources = new ArrayList<>(resourceNames);
    noPropResources.remove(profile.getTask().getResource().getKey());

    PropagationByResource propByRes = new PropagationByResource();
    propByRes.add(ResourceOperation.CREATE, profile.getTask().getResource().getKey());

    taskExecutor.execute(
        propagationManager.getUpdateTasks(
            any.getType().getKind(),
            any.getKey(),
            changepwd,
            null,
            propByRes,
            null,
            noPropResources));

    return getAny(any.getKey());
  }
  protected void provision(final Any<?> any, final Boolean enabled) {
    AnyTO before = getAnyTO(any.getKey());

    List<String> noPropResources = new ArrayList<>(before.getResources());
    noPropResources.remove(profile.getTask().getResource().getKey());

    PropagationByResource propByRes = new PropagationByResource();
    propByRes.add(ResourceOperation.CREATE, profile.getTask().getResource().getKey());

    taskExecutor.execute(
        propagationManager.getCreateTasks(
            any.getType().getKind(),
            any.getKey(),
            propByRes,
            before.getVirAttrs(),
            noPropResources));
  }