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: "); }
}
Subscriber Exclusive Content
A Liferay Enterprise Subscription provides access to over 1,500 articles that include best practices, troubleshooting, and other valuable solutions. Sign in for full access.
Sign In