I am trying to add permissions to a Liferay-Portlet based on the Liferay documentation . Since the portlet will be delivered in a war package, I want to determine the portlet permissions inside the portlet itself.
I created a resource-actions.xml file with the following contents (the portlet name is the same as the name given in portlet.xml and liferay is *. Xml):
<?xml version="1.0"?> <resource-action-mapping> <portlet-resource> <portlet-name>test-portlet</portlet-name> <supports> <action-key>SELECT</action-key> <action-key>VIEW</action-key> <action-key>TEST_PERM</action-key> </supports> <community-defaults> <action-key>VIEW</action-key> </community-defaults> <guest-defaults> <action-key>VIEW</action-key> </guest-defaults> </portlet-resource>
An undefined resource model is defined, because at first I just want to see if Liferay loads the permissions specified in the mapping file.
I placed the file in the folders - WEB-INF - WEB-INF / classes - inside the portal-impl.jar Liferey -...
But the new permission TEST_PERM is not displayed in the control panel → Roles → Define permissions → Add portlet permissions → test portlet. Does anyone know what I'm doing wrong here?
source share