Fórumok
Hook (ModelListener) for Role permission
Liferay Liferay, módosítva 8 év-val korábban
Hook (ModelListener) for Role permission
Junior Member Bejegyzések: 55 Csatlakozás dátuma: 2010.05.18. Legújabb bejegyzések
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, módosítva 8 év-val korábban
RE: Hook (ModelListener) for Role permission (Válasz)
Junior Member Bejegyzések: 54 Csatlakozás dátuma: 2015.05.29. Legújabb bejegyzések
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.