掲示板
Hook (ModelListener) for Role permission
8年前 に Liferay Liferay によって更新されました。
Hook (ModelListener) for Role permission
Junior Member 投稿: 55 参加年月日: 10/05/18 最新の投稿
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
8年前 に Pavel Savinov によって更新されました。
RE: Hook (ModelListener) for Role permission (回答)
Junior Member 投稿: 54 参加年月日: 15/05/29 最新の投稿
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.