Model Listener cannot record an occurrence for user assignment in a password policy

Issue

  • Unable to record audit records using the add association method in either the user listener or the password policy model listener when a user gets assigned to a password policy.

Environment

  • DXP 7.4

Resolution

  • Instead of PasswordPolicy, the PasswordPolicyRel object should be used, and then you need to override the onAfterCreate method, like this:
@Component(immediate = true, property = {}, service = ModelListener.class)
public class PasswordPolicyListener extends BaseModelListener<PasswordPolicyRel> {

@Override public void onAfterCreate(PasswordPolicyRel model) throws ModelListenerException {
System.out.println(
"About to created password policy rel: "); }
}

 

¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0