Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 5.1.2, 5.2.2
-
Fix Version/s: 5.2.3
-
Component/s: -- none --
-
Labels:None
-
Environment:Liferay 5.2.2
Tomcat 6.0.18
-
Similar Issues:
Description
When adding new Layout, there are always GUEST permissions added to the resource:
resourceLocalService.addResources(
user.getCompanyId(), groupId, user.getUserId(),
Layout.class.getName(), layout.getPlid(), false, true, true);
You can notice the last true in the call which means "add guest permissions". Therefore the addGuestPermissions method is executed:
The solution should be:
resourceLocalService.addResources(
user.getCompanyId(), groupId, user.getUserId(),
Layout.class.getName(), layout.getPlid(), false, true, !layout.isPrivateLayout());
Next possible solution could be to implement filterGuestPermission method in PermissionListFilterImpl so as it filters private layouts:

This fix is not need since private pages are only accessible by authenticated users who belong to organization/community.