掲示板

Custom Permissions not working in LR 6.0.12 EE

12年前 に Andy Harb によって更新されました。

Custom Permissions not working in LR 6.0.12 EE

Junior Member 投稿: 66 参加年月日: 09/10/22 最新の投稿
Hi,

So I am trying to implement some custom permissions in a portlet. I have done this before in 5.2.6 successfully but when i attempt in 6.0.12 it is throwing errors.

default.xml

<resource-action-mapping>
  <portlet-resource>
    <portlet-name>highlight</portlet-name>
    <permissions>
      <supports>
        <action-key>MANAGE_HIGHLIGHT</action-key>
        <action-key>ADD_TO_PAGE</action-key>
        <action-key>CONFIGURATION</action-key>
        <action-key>VIEW</action-key>
      </supports>
      
      <community-defaults>
        <action-key>VIEW</action-key>
      </community-defaults>
      
      <guest-defaults>
        <action-key>VIEW</action-key>
      </guest-defaults>
      
      <guest-unsupported>
      	<action-key>MANAGE_HIGHLIGHT</action-key>
      </guest-unsupported>
      
    </permissions>
  </portlet-resource>
</resource-action-mapping>


portlet.properties

include-and-override=portlet-ext.properties
language.bundle=content.Language
resource.actions.configs=resource-actions/default.xml


Language.properties

action.MANAGE_HIGHLIGHT = Manage Highlights
....


Added "<resource-bundle>content.Language</resource-bundle>" into the portlet.xml file.


I also ran the build-lang so I have all the Language_**properties files

Okay so after i set this up anytime I navigate to the "Permissions" Tab through the portal the following error is thrown:


22:19:10,316 ERROR [IncludeTag:410] Current URL <url> generates exception: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key action.MANAGE_HIGHLIGHT
22:19:10,318 ERROR [IncludeTag:154] java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key action.MANAGE_HIGHLIGHT
	at java.util.ResourceBundle.getObject(ResourceBundle.java:374)
	at java.util.ResourceBundle.getString(ResourceBundle.java:334)
	at com.liferay.portal.kernel.util.ResourceBundleUtil.getString(ResourceBundleUtil.java:59)
	at com.liferay.portlet.PortletResourceBundles._getString(PortletResourceBundles.java:161)
	at com.liferay.portlet.PortletResourceBundles._getString(PortletResourceBundles.java:137)
	at com.liferay.portlet.PortletResourceBundles._getString(PortletResourceBundles.java:126)
	at com.liferay.portlet.PortletResourceBundles._getString(PortletResourceBundles.java:133)
	at com.liferay.portlet.PortletResourceBundles.getString(PortletResourceBundles.java:49)
	at com.liferay.portal.security.permission.ResourceActionsImpl.getAction(ResourceActionsImpl.java:156)
	at com.liferay.portal.security.permission.ResourceActionsUtil.getAction(ResourceActionsUtil.java:81)
	at org.apache.jsp.html.portlet.portlet_005fconfiguration.edit_005fpermissions_005falgorithm_005f5_005fto_005f6_jsp._jspService(edit_005fpermissions_005falgorithm_005f5_005fto_005f6_jsp.java:1498)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
</url>


From the stacktrace it almost seems like my action.MANAGE_HIGHLIGHT key is not found in my Language File. Now i have other keys in the language file i am using through my portlet front end and they are working as expected.

Has anyone come across this and if so have they found any resolution? Any points suggestions would be greatly appreciated.

Thanks
Andy


Edit:
+ I also tested out the sample-permissions-portlet and the same error occurs except the key refers to the sample portlets custom permission.
+ When i remove the "<action-key>MANAGE_HIGHLIGHT</action-key>" from my default.xml it works as expected but of course my custom permission isn't there.
thumbnail
12年前 に David H Nebinger によって更新されました。

RE: Custom Permissions not working in LR 6.0.12 EE

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
As you are a 6.0 EE customer, perhaps you should use the 6.0 EE support site to get assistance. Not that there might not be someone here who's seen the same thing, but you should get a response from EE support where here it's hit or miss...
12年前 に Andy Harb によって更新されました。

RE: Custom Permissions not working in LR 6.0.12 EE

Junior Member 投稿: 66 参加年月日: 09/10/22 最新の投稿
Thanks David,

I tend to try to get the answers in the general forums before moving to a support ticket. I will ask our ops partner to open one up.

Thanks
Andy