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

Jean-Noël Rouvignac
22.34.2015 cce0ebbc8595a0efa7f57c65c67998150f95baf6
LocalBackendModifyOperation.java: Extracted method isAuthnManagedLocally()
1 files modified
26 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java 26 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
@@ -184,7 +184,14 @@
    LocalBackendWorkflowElement.attachLocalOperation (modify, this);
  }
  /**
   * Returns whether authentication for this user is managed locally
   * or via Pass-Through Authentication.
   */
  private boolean isAuthnManagedLocally()
  {
    return pwPolicyState != null;
  }
  /**
   * Retrieves the current entry before any modifications are applied.  This
@@ -819,9 +826,9 @@
    isEnabled = true;
    enabledStateChanged = false;
    if (pwPolicyState == null)
    if (!isAuthnManagedLocally())
    {
      // Account not managed locally so nothing to do.
      // nothing to do.
      return;
    }
@@ -1560,8 +1567,7 @@
  public void performAdditionalPasswordChangedProcessing()
         throws DirectoryException
  {
    if (!passwordChanged
        || pwPolicyState == null) // Account not managed locally
    if (!isAuthnManagedLocally() || !passwordChanged)
    {
      // Nothing to do.
      return;
@@ -1673,15 +1679,9 @@
   */
  private void handleAccountStatusNotifications()
  {
    if (pwPolicyState == null)
    if (!isAuthnManagedLocally())
    {
      // Account not managed locally, so nothing to do.
      return;
    }
    if (!passwordChanged && !enabledStateChanged && !wasLocked)
    {
      // Account managed locally, but unchanged, so nothing to do.
      // nothing to do.
      return;
    }