Forums

Home » Liferay Portal » English » Liferay Legacy »

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Pere Cortada Bonjoch
Directory portlet: Couldn't see user details
January 25, 2007 5:03 AM
Answer

Pere Cortada Bonjoch

Rank: New Member

Posts: 10

Join Date: September 13, 2006

Recent Posts

Hello,
i'm trying to let anonymous users access to directory and view the person details that can (should) be viewed when you click in the results,
I've gived permisions to view the portlet directory to the role/community guest, but when i click on the found username I obtain:

You do not have the required permissions.
Where can i set this permissions?
Thanks

[UPDATE] I've seen that the page whith the user details is edit_user.jsp, i didn't know if it's permisions depends on Directory Portlet or elsewere.
Kachun Ng
RE: Directory portlet: Couldn't see user details
January 26, 2007 9:56 AM
Answer

Kachun Ng

Rank: New Member

Posts: 6

Join Date: December 12, 2006

Recent Posts

I think I can help you. I had the same problem.

After a lot of trials, I figure it out how to do it.

1. The user is allowed to see all other users of the same organisation as the current user.

2. It is also possible to see all users of the whole "Enterprise" by using the finegrained Delegate function. I presume all users have the role "User". In the Enterprise Admin portlet, select the Delegate function of the role "User". You will get a list of portlets. Select "Enterprise Admin". Then select resource "User". Choose the scope "Enterprise" in the dropdown box of action View. Press next and finished.
Pere Cortada Bonjoch
RE: Directory portlet: Couldn't see user details
January 30, 2007 6:58 AM
Answer

Pere Cortada Bonjoch

Rank: New Member

Posts: 10

Join Date: September 13, 2006

Recent Posts

Thanks a lot! it works!
Carolina Mascarenhas
RE: Directory portlet: Couldn't see user details
April 17, 2007 1:28 PM
Answer

Carolina Mascarenhas

Rank: New Member

Posts: 10

Join Date: September 27, 2006

Recent Posts

Thanks! emoticon
Arun Seehra
RE: Directory portlet: Couldn't see user details
July 9, 2007 2:04 PM
Answer

Arun Seehra

Rank: New Member

Posts: 7

Join Date: June 29, 2007

Recent Posts

Thanks so much!

The only problem I have left is that I want Guests to be able to see the directory without logging in. I tried the enterprise admin portlet solution (which worked for the User role) but it doesn't seem to have any effect on the Guest role.

Any help would be greatly appreciated!

~Arun
Anonymous
RE: Directory portlet: Couldn't see user details
July 10, 2007 7:14 AM
Answer

Anonymous

I also need Guests to be able to access to user informations. I am looking for the code that redirect guest to error jsp page but I haven't found out yet.

thanks.
Arun Seehra
RE: Directory portlet: Couldn't see user details
July 12, 2007 6:28 AM
Answer

Arun Seehra

Rank: New Member

Posts: 7

Join Date: June 29, 2007

Recent Posts

Just bumping this back up. So far I've figured out that an exception is being thrown, causing the error.jsp page to load. But why a PrincipalException is being thrown I've yet to figure out. Any help at all on this problem would be greatly appreciated.

Thanks in advance,

~Arun
Arun Seehra
RE: Directory portlet: Couldn't see user details
July 16, 2007 7:38 AM
Answer

Arun Seehra

Rank: New Member

Posts: 7

Join Date: June 29, 2007

Recent Posts

Since no one has responded yet, and I ahve yet to find a solution, I have opened a ticket for this:

LEP-3269
Arun Seehra
RE: Directory portlet: Couldn't see user details
July 16, 2007 10:27 AM
Answer

Arun Seehra

Rank: New Member

Posts: 7

Join Date: June 29, 2007

Recent Posts

Found the following somewhat roundabout solution to the problem:

Insert the following try-catch block into /portal/portal-ejb/src/com/liferay/portal/security/permission/PermissionCheckerImpl.java at line 327 (within hasGuestPermissions(...) before the final try-catch block of the method):


            try {
                    Resource resource = ResourceServiceUtil.getResource(
                            companyId, name, ResourceImpl.TYPE_CLASS,
                            ResourceImpl.SCOPE_COMPANY, companyId);

                    String resourceId = resource.getResourceId();
                    boolean result =  PermissionServiceUtil.hasGroupPermission(
                            guestGroup.getGroupId(), actionId, resourceId);
                    if(result) {
                            return result;
                    }
            }
            catch(NoSuchResourceException nsre) {
            }


In the database, use the following SQL statement (I use postgres) to add the necessary permissions (as this is not accessible through any GUI portlet):

INSERT INTO groups_permissions (
  SELECT g.groupid, permissionid
  FROM permission_ p, group_ g
  WHERE g.name = 'Guest' AND p.actionid='VIEW' AND p.resourceid = (
    SELECT resourceid
    FROM resource_
    WHERE name = 'com.liferay.portal.model.User' AND scope = 'company'
  )
);
Krati Gupta
RE: Directory portlet: Couldn't see user details
January 17, 2011 1:20 AM
Answer

Krati Gupta

Rank: Regular Member

Posts: 102

Join Date: December 5, 2008

Recent Posts

Hi ,

I am using Liferay 5.2.3 CE , so could you please specify as the above mentioned steps are not properly followed .
Rajesh Bangaram
RE: Directory portlet: Couldn't see user details
January 30, 2012 5:38 AM
Answer

Rajesh Bangaram

Rank: Junior Member

Posts: 68

Join Date: March 8, 2011

Recent Posts

Hi all,

I have the same problem, Unable to view User details anonymously. Did anyone find a workaround for it?

Thanks in advance.

-Regards
Rajesh