mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
21.11.2015 c44f3035dcf6eefce85719b8eaf78dabb784e803
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
@@ -755,7 +755,7 @@
      // If the attribute type is marked "NO-USER-MODIFICATION" then fail unless
      // this is an internal operation or is related to synchronization in some way.
      final boolean isInternalOrSynchro = isInternalOperation() || isSynchronizationOperation() || m.isInternal();
      final boolean isInternalOrSynchro = isInternalOrSynchro(m);
      if (t.isNoUserModification() && !isInternalOrSynchro)
      {
        throw newDirectoryException(currentEntry,
@@ -795,6 +795,11 @@
    }
  }
  private boolean isInternalOrSynchro(Modification m)
  {
    return isInternalOperation() || m.isInternal() || isSynchronizationOperation();
  }
  private boolean isPassword(AttributeType t)
  {
    return pwPolicyState != null
@@ -954,6 +959,12 @@
        processInitialSchema(m.getModificationType(), a);
      }
      else if (!isInternalOrSynchro(m)
          && t.equals(getAttributeTypeOrDefault(OP_ATTR_ACCOUNT_DISABLED)))
      {
        enabledStateChanged = true;
        isEnabled = pwPolicyState != null && !pwPolicyState.isDisabled();
      }
    }
  }