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

Valery Kharseko
12 hours ago df0af76ae6838013c0e66bf5d17c7e7aae44dac2
opendj-server-legacy/src/main/java/org/opends/server/plugins/PasswordPolicyImportPlugin.java
@@ -74,6 +74,8 @@
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The configuration which this plugin is registered with as a change listener. */
  private PasswordPolicyImportPluginCfg currentConfig;
  /** The attribute type used to specify the password policy for an entry. */
  private AttributeType customPolicyAttribute;
  /** The set of attribute types defined in the schema with the auth password syntax. */
@@ -107,6 +109,7 @@
         throws ConfigException
  {
    configuration.addPasswordPolicyImportChangeListener(this);
    currentConfig = configuration;
    Schema schema = DirectoryServer.getInstance().getServerContext().getSchema();
    customPolicyAttribute = schema.getAttributeType(OP_ATTR_PWPOLICY_POLICY_DN);
@@ -224,6 +227,12 @@
  }
  @Override
  public final void finalizePlugin()
  {
    currentConfig.removePasswordPolicyImportChangeListener(this);
  }
  @Override
  public void processImportBegin(LocalBackend<?> backend, LDIFImportConfig config)
  {
    // Find the set of attribute types with the auth password and user password