Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Cameron McBride
Portlet configuration page doesnt work with PACL but no errors are printed?
8 de noviembre de 2012 10:23
Respuesta

Cameron McBride

Ranking: Expert

Mensajes: 278

Fecha de incorporación: 8 de febrero de 2011

Mensajes recientes

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.
Anónimo
RE: Portlet configuration page doesnt work with PACL but no errors are prin
9 de noviembre de 2012 2:40
Respuesta

Anónimo

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 de noviembre de 2012 16:27
Respuesta

Cameron McBride

Ranking: Expert

Mensajes: 278

Fecha de incorporación: 8 de febrero de 2011

Mensajes recientes

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.