Fórum

Cannot access portlet, non-admin user, private page

Jerry Smith, modificado 10 Anos atrás.

Cannot access portlet, non-admin user, private page

New Member Postagens: 6 Data de Entrada: 10/10/12 Postagens Recentes
Hi,

I'm working on a upgrade from 5.1.0 to 6.1.20 EE. We are currently in testing.

After the upgrade process has completed, I try to create a new user. The user is created with the role Power User. I then try to add one of our portlets which I have upgraded to work in 6.1.20. I verified with an admin user that the code works (I can add and remove the portlet from any page).

When I log in as any non-admin user, I can add the portlet to the user's personal private pages but I get this:

You do not have the roles required to access this portlet.

I cannot even remove the portlet from the page.

I've tried logging in as a regular user (w/ role Power User) that was present before the upgrade and the portlet is working if it was already on the page before the upgrade but if I remove it and re-add it or add it to any other page (including a new page), I have the problem above.

If I add the Administrator role to the user, I can see the portlet contents and manage it.

Also, I can add and remove the portlets that come with Liferay like Calendar or Message Boards. I can also add and use the portlet on the user's public page.

I thought this was an issue with portlet.xml or liferay-portlet.xml but they seem to be correct:

portlet.xml

		<security-role-ref>
			<role-name>administrator</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>guest</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>power-user</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>user</role-name>
		</security-role-ref>


liferay-portlet.xml

	<role-mapper>
		<role-name>administrator</role-name>
		<role-link>Administrator</role-link>
	</role-mapper>
	<role-mapper>
		<role-name>guest</role-name>
		<role-link>Guest</role-link>
	</role-mapper>
	<role-mapper>
		<role-name>power-user</role-name>
		<role-link>Power User</role-link>
	</role-mapper>
	<role-mapper>
		<role-name>user</role-name>
		<role-link>User</role-link>
	</role-mapper>


Any idea how I can debug this problem?

Thanks,

Jerry Smith
thumbnail
Brian Scott Schupbach, modificado 10 Anos atrás.

RE: Cannot access portlet, non-admin user, private page

Expert Postagens: 329 Data de Entrada: 23/10/08 Postagens Recentes
Check your portal-ext.properties and see if this is set to true:

layout.user.public.layouts.modifiable=true
Jerry Smith, modificado 10 Anos atrás.

RE: Cannot access portlet, non-admin user, private page

New Member Postagens: 6 Data de Entrada: 10/10/12 Postagens Recentes
Hi,

It wasn't set to true, but that did put me on the right path.

It seems that Power User has permission only to add my own portlets to a page but can't view them or configure them. I added View and Configuration to Power User role for that particular portlet and it works.

I hope there is an easy way to modify these permissions without having to go through the Role one portlet at a time.