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'
)
);
Please sign in to flag this as inappropriate.