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

neil_a_wilson
31.14.2006 ca68a5303b6890cc4d8f6136132bde1dc1a0e6df
opends/src/server/org/opends/server/core/ModifyOperation.java
@@ -836,6 +836,25 @@
      }
      // If the user must change their password before doing anything else, and
      // if the target of the modify operation isn't the user's own entry, then
      // reject the request.
      if (clientConnection.mustChangePassword())
      {
        DN authzDN = getAuthorizationDN();
        if ((authzDN != null) && (! authzDN.equals(entryDN)))
        {
          // The user will not be allowed to do anything else before
          // the password gets changed.
          setResultCode(ResultCode.UNWILLING_TO_PERFORM);
          int msgID = MSGID_MODIFY_MUST_CHANGE_PASSWORD;
          appendErrorMessage(getMessage(msgID));
          break modifyProcessing;
        }
      }
      // Check for and handle a request to cancel this operation.
      if (cancelRequest != null)
      {
@@ -1283,7 +1302,8 @@
            pwPolicyState.clearGraceLoginTimes();
            pwPolicyState.clearWarnedTime();
            if (pwPolicyState.forceChangeOnReset())
            if (pwPolicyState.forceChangeOnAdd() ||
                pwPolicyState.forceChangeOnReset())
            {
              pwPolicyState.setMustChangePassword(! selfChange);
            }