Kombinierte Ansicht Flache Ansicht Baumansicht
toggle
Cameron McBride
Portlet configuration page doesnt work with PACL but no errors are printed?
8. November 2012 10:23
Antwort

Cameron McBride

Rang: Youngling

Nachrichten: 0

Eintrittsdatum: 8. Februar 2011

Neue Beiträge

I have created a simple portlet using the Liferay MVC framework and have added a ConfigurationActionImpl class and configuration.jsp for portlet settings.

- With PACL off it works fine.
- With PACL on the popup comes up with Settings/Permissions/etc but the settings page is not displayed. No errors are reported in the console like with other PACL errors.

1    @Override
2    public String render(final PortletConfig portletConfig, final RenderRequest renderRequest,
3            final RenderResponse renderResponse) throws Exception {
4        System.out.println("In config");
5        return "/html/test/configuration.jsp";
6    }


In the above code the print out does get printed. I also put a print in the configuration.jsp and it does not get displayed. What PACL setting is needed for portlet configuration?

Update: I also checked the test-pacl-portlet and it does not have an example of portlet configuration.
Anonym
RE: Portlet configuration page doesnt work with PACL but no errors are prin
9. November 2012 02:40
Antwort

Anonym

Hi Cameron,

I have some fresh experience regarding this from yesterday. I managed to get the Youtube portlet work by adding the following to liferay-plugin-package.properties:

security-manager-enabled=true

security-manager-files-read=\
${java.io.tmpdir}${file.separator}-,\
${liferay.web.portal.dir}${file.separator}html${file.separator}taglib${file.separator}-,\
${liferay.web.portal.dir}${file.separator}html${file.separator}themes${file.separator}-
security-manager-files-write=${java.io.tmpdir}${file.separator}-

security-manager-get-bean-property=\
com.liferay.portal.util.PortalUtil,\
com.liferay.portal.kernel.deploy.hot.HotDeployUtil,\
com.liferay.portal.kernel.util.PropsUtil,\
com.liferay.portal.kernel.servlet.DirectRequestDispatcherFactoryUtil,\
com.liferay.portal.kernel.cache.key.CacheKeyGeneratorUtil,\
com.liferay.portal.kernel.servlet.DirectServletRegistryUtil,\
com.liferay.portal.kernel.configuration.ConfigurationFactoryUtil,\
com.liferay.portlet.PortletPreferencesFactoryUtil,\
com.liferay.portal.kernel.dao.orm.EntityCacheUtil,\
com.liferay.portal.kernel.cache.CacheRegistryUtil,\
com.liferay.portal.kernel.dao.shard.ShardUtil,\
com.liferay.portal.kernel.staging.LayoutStagingUtil,\
com.liferay.portal.kernel.dao.db.DBFactoryUtil,\
com.liferay.portal.kernel.dao.orm.FinderCacheUtil,\
com.liferay.portal.security.auth.AuthTokenUtil,\
com.liferay.portal.kernel.util.HttpUtil,\
com.liferay.portal.service.permission.PortletPermissionUtil,\
com.liferay.portal.kernel.util.HtmlUtil,\
com.liferay.portal.kernel.util.LocaleUtil

security-manager-services=\
com.liferay.portal.service.GroupLocalService,\
com.liferay.portal.service.PortletPreferencesLocalService,\
com.liferay.portal.service.LayoutLocalService,\
com.liferay.portal.service.LayoutSetLocalService


If you don't see the error messages about the missing classes then you need to set the log level of BaseChecker to WARN. As this didn't work for me, I caught the Caught/Uncaught SecurityExceptions using the debugger in order to see what classes I need to add.

Regards,
Gábor
Cameron McBride
RE: Portlet configuration page doesnt work with PACL but no errors are prin
12. November 2012 16:27
Antwort

Cameron McBride

Rang: Youngling

Nachrichten: 0

Eintrittsdatum: 8. Februar 2011

Neue Beiträge

I added all of those and that got me past the missing PACL errors. My portlet is now PACL error free! Thanks so much for the help.

I still need to go back through one at a time and figure out which was the rogue exception.

Forums

To access the Developer Forum, please login to your Liferay.com account if you are already a registered developer or register to become a developer.