Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Jerry Smith
Cannot access portlet, non-admin user, private page
3 de Maio de 2013 12:22
Resposta

Jerry Smith

Ranking: New Member

Mensagens: 6

Data de entrada: 10 de Outubro de 2012

Mensagens 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
 1
 2        <security-role-ref>
 3            <role-name>administrator</role-name>
 4        </security-role-ref>
 5        <security-role-ref>
 6            <role-name>guest</role-name>
 7        </security-role-ref>
 8        <security-role-ref>
 9            <role-name>power-user</role-name>
10        </security-role-ref>
11        <security-role-ref>
12            <role-name>user</role-name>
13        </security-role-ref>


liferay-portlet.xml
 1
 2    <role-mapper>
 3        <role-name>administrator</role-name>
 4        <role-link>Administrator</role-link>
 5    </role-mapper>
 6    <role-mapper>
 7        <role-name>guest</role-name>
 8        <role-link>Guest</role-link>
 9    </role-mapper>
10    <role-mapper>
11        <role-name>power-user</role-name>
12        <role-link>Power User</role-link>
13    </role-mapper>
14    <role-mapper>
15        <role-name>user</role-name>
16        <role-link>User</role-link>
17    </role-mapper>


Any idea how I can debug this problem?

Thanks,

Jerry Smith
Brian Scott Schupbach
RE: Cannot access portlet, non-admin user, private page
3 de Maio de 2013 12:57
Resposta

Brian Scott Schupbach

Ranking: Expert

Mensagens: 329

Data de entrada: 23 de Outubro de 2008

Mensagens recentes

Check your portal-ext.properties and see if this is set to true:

layout.user.public.layouts.modifiable=true
Jerry Smith
RE: Cannot access portlet, non-admin user, private page
3 de Maio de 2013 14:13
Resposta

Jerry Smith

Ranking: New Member

Mensagens: 6

Data de entrada: 10 de Outubro de 2012

Mensagens 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.