Message Boards
[LF7.1GA2] Permission missing from portlet
Diego Cantone, modified 5 Years ago.
[LF7.1GA2] Permission missing from portlet
Junior Member Posts: 42 Join Date: 11/10/16 Recent Posts
Hello, i followed this tutorial to define Portlet Permission, but the portlet doesn't want to show the permission i defined in the xml file, the strange thing is that in another module everything works fine, but i followed exactly the same step, i created the xml file inside resource-action folder, i defined the permission with the following scheme
I already tried to restart the server, clean temp folder, redeploy many times the module..
<!--?xml version="1.0"?-->
<resource-action-mapping>
<portlet-resource>
<portlet-name>it_ext_mk_liferay_portlet_scorm_portlet_CorsiScormPortlet</portlet-name>
<permissions>
<supports>
<action-key>CONFIGURATION</action-key>
<action-key>PREFERENCES</action-key>
<action-key>VIEW</action-key>
<action-key>COORDINAMENTO_CORSI</action-key>
</supports>
<site-member-defaults>
<action-key>VIEW</action-key>
</site-member-defaults>
<guest-defaults></guest-defaults>
<guest-unsupported>
<action-key>CONFIGURATION</action-key>
<action-key>PREFERENCES</action-key>
<action-key>VIEW</action-key>
<action-key>COORDINAMENTO_CORSI</action-key>
</guest-unsupported>
</permissions>
</portlet-resource>
</resource-action-mapping>
then i edited the portlet.properties file to insert##
## Resource Actions
##
#
# Input a list of comma delimited resource action configurations that will
# be read from the class path.
#
resource.actions.configs=META-INF/resource-actions/corsiscorm.xml
anyone have an idea of why it doen't work?I already tried to restart the server, clean temp folder, redeploy many times the module..
David H Nebinger, modified 5 Years ago.
RE: [LF7.1GA2] Permission missing from portlet
Liferay Legend Posts: 14917 Join Date: 9/2/06 Recent Posts
I've seen cases where redeployment doesn't change existing permissions defined for a portlet.
I would suggest two things:
1. verify that the portlet id is it_ext_mk_liferay_portlet_scorm_portlet_CorsiScormPortlet because, if it is different, the permissions don't apply to it.
2. Purge osgi/state as well as the portlet's record from the Release_ table so Liferay sees it as a new deployment, not an update.
IIRC there's a blurb in the linked doco indicating that the perms will apply only during first time deployment; I think redeploys and updates need to do their permission adds separately via an upgrade process.
I would suggest two things:
1. verify that the portlet id is it_ext_mk_liferay_portlet_scorm_portlet_CorsiScormPortlet because, if it is different, the permissions don't apply to it.
2. Purge osgi/state as well as the portlet's record from the Release_ table so Liferay sees it as a new deployment, not an update.
IIRC there's a blurb in the linked doco indicating that the perms will apply only during first time deployment; I think redeploys and updates need to do their permission adds separately via an upgrade process.
Diego Cantone, modified 5 Years ago.
RE: [LF7.1GA2] Permission missing from portlet
Junior Member Posts: 42 Join Date: 11/10/16 Recent Posts
Hi David, thanks for answer, i checked the portlet name many times, now i also tried to delete osgi/state folder, but without success..
I also take a look to the Release table, and i noticed that there isn't any portlet module record, but only the service-module record..
Also permission configurations work fine on the service module, i've just tried to change the xml file and after a redeploy i can see new permission in the control panel..
Edit: I just tried to put
I also take a look to the Release table, and i noticed that there isn't any portlet module record, but only the service-module record..
Also permission configurations work fine on the service module, i've just tried to change the xml file and after a redeploy i can see new permission in the control panel..
Edit: I just tried to put
<portlet-resource>
<portlet-name>it_ext_mk_liferay_portlet_scorm_portlet_CorsiScormPortlet</portlet-name>
<permissions>
<supports>
<action-key>CONFIGURATION</action-key>
<action-key>PREFERENCES</action-key>
<action-key>VIEW</action-key>
<action-key>COORDINAMENTO-CORSI</action-key>
</supports>
<site-member-defaults>
<action-key>VIEW</action-key>
</site-member-defaults>
<guest-defaults></guest-defaults>
<guest-unsupported>
<action-key>CONFIGURATION</action-key>
<action-key>PREFERENCES</action-key>
<action-key>VIEW</action-key>
<action-key>COORDINAMENTO-CORSI</action-key>
</guest-unsupported>
</permissions>
</portlet-resource>
Inside the xml file in the service module, and it works, any idea of why the portlet module doesn't want to update its permission scheme?