Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dave Kliczbor
"You do not have the roles required to access this portlet"
November 7, 2011 8:57 AM
Answer

Dave Kliczbor

Rank: Junior Member

Posts: 55

Join Date: July 12, 2011

Recent Posts

Hello there,

Reading the forums, this is a common error -- but still, what I read by now doesn't help me.

I am having problems with a few portlets, namely all of the "social networking" portlets and some other standard and self-developed portlets (OTOH, some standard and some self-developed portlets do work -- it feels a bit random...). Whenever I place any of them on a user's private page, they won't work (on the user's public page: no problem!). Error message: "You do not have the roles required to access this portlet". This error comes up on a test system after installing Liferay 6.1.0 beta 3 (SVN snapshot version from ~July/August worked fine).

We do not want the user to administrate his private page, so we give him his private page from a template as soon as he becomes member of a certain user group. My only hunch would be the following thought: the admin places the portlets on the template, so the permissions may be preserved when creating a user's private page from it.

Where could I have gone wrong while installing Liferay? Where are the permissions set for the user's private pages? Where is a list of the required roles for a portlet? Should a user be "Owner" for his own private page? How can I check if the user really has the "Owner" role for his own private user page? How can I find the point where the permissions fail? Is there a log level to increase in the server administration?

Questions, more questions and questions about questions *sigh* ... any ideas, hints or even solutions are welcome. I'm stumped right now.
Linus Sphinx
RE: "You do not have the roles required to access this portlet"
November 7, 2011 10:10 AM
Answer

Linus Sphinx

Rank: Junior Member

Posts: 84

Join Date: August 12, 2010

Recent Posts

Not sure what your issue is but maybe if the new users had the roles they need by default to access the portlets you put on their pages they wouldn't get those informational messages;

# Input a list of default role names separated by \n characters that are
# associated with newly created users.
#
admin.default.role.names=Power User\nUser

Information on the various roles can be found in the control panel.
Hitoshi Ozawa
RE: "You do not have the roles required to access this portlet"
November 7, 2011 1:46 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7954

Join Date: March 23, 2010

Recent Posts

If permission for user's private page is in doubt, just check the database table. Beta release is a beta release.
Dave Kliczbor
RE: "You do not have the roles required to access this portlet"
November 8, 2011 7:18 AM
Answer

Dave Kliczbor

Rank: Junior Member

Posts: 55

Join Date: July 12, 2011

Recent Posts

Thanks, guys, for the answers...

@Linus: That's our setting. It also hadn't been changed in the Control Panel. And, judging from the database table USERS_ROLES, all users do have the roles "User" and "Power User".

@Hitoshi: I'd love to if I could find and then interpret the data. I've looked at the tables hard enough, but did not find the information I was looking for.

I started at table LAYOUTSETPROTOTYPE and found the Website Templates I created. Not the Site Templates inside them, though. They must be referred to by ID, I thought. But I did not find any column LAYOUTSETPROTOTYPEID nor any role information in the tables LAYOUTSET, LAYOUT, PORTLETPREFERENCES, PORTLETITEM, PORTLET. I did not even find the portlet placement specs for each layout. Even the database schema of 4.0.0 did not help: the tables GROUPS_PERMISSIONS and ROLES_PERMISSIONS are empty. Is someone able to shed more light on this?

From outside this forum, I got the information to set the permissions on each and every portlet in the template. That worked so far, but it leaves me with a nagging question... Why does it work if I put it on the site template for the user's public page (instead of the private page)??