Foros de discusión
Hook (ModelListener) for Role permission
Liferay Liferay, modificado hace 8 años.
Hook (ModelListener) for Role permission
Junior Member Mensajes: 55 Fecha de incorporación: 18/05/10 Mensajes recientes
Hi Liferay Gurus,
Can you please help me to capture the event for "define permissions" of a Role.
Steps
===
1. Goto Control Panel, and select Roles
2. Select a Role and select "Define Permissions"
3. Define any permission for that role and Save.
How to capture this event in Model Listener.
Thanks
-H
Can you please help me to capture the event for "define permissions" of a Role.
Steps
===
1. Goto Control Panel, and select Roles
2. Select a Role and select "Define Permissions"
3. Define any permission for that role and Save.
How to capture this event in Model Listener.
Thanks
-H
Pavel Savinov, modificado hace 8 años.
RE: Hook (ModelListener) for Role permission (Respuesta)
Junior Member Mensajes: 54 Fecha de incorporación: 29/05/15 Mensajes recientes
Role permissions are com.liferay.portal.model.ResourcePermission, take a look on the following methods of your listener:
In those methods you can find out, which permission was assigned or removed.
public void onAfterAddAssociation(Object classPK, String associationClassName, Object associationClassPK) throws ModelListenerException;
public void onAfterRemoveAssociation(Object classPK, String associationClassName, Object associationClassPK) throws ModelListenerException;
In those methods you can find out, which permission was assigned or removed.