Hi Juan,
Yes, those are the elements that I'm looking at.
I created a basic example (using XMLPortletFactory 2.2 / Liferay 6.1.1-ce-ga2) to illustrate. XMLPortletFactory generates resource-actions/default.xml, including the following section for my sample entity:
1<model-resource>
2 <model-name>org.xmlportletfactory.example01.permcheck.model.permcheck</model-name>
3 <portlet-ref>
4 <portlet-name>permcheck</portlet-name>
5 </portlet-ref>
6 <supports>
7 <action-key>DELETE</action-key>
8 <action-key>PERMISSIONS</action-key>
9 <action-key>UPDATE</action-key>
10 <action-key>VIEW</action-key>
11 </supports>
12 <site-member-defaults>
13 <action-key>DELETE</action-key>
14 <action-key>UPDATE</action-key>
15 <action-key>VIEW</action-key>
16 </site-member-defaults>
17 <guest-defaults>
18 <action-key>VIEW</action-key>
19 </guest-defaults>
20 <guest-unsupported>
21 <action-key>PERMISSIONS</action-key>
22 </guest-unsupported>
23 </model-resource>
24
When I create a 'permcheck' entity entry using the XMLPortletFacotry generated admin portlet, I would expect the <guest-defaults> and <site-member-defaults> permissions to be applied by default, but when I create an entry and then click Actions / Permissions, only the Owner permissions are set. The Guest VIEW and Site Member DELETE, UPDATE, and VIEW that were set in default.xml are not checked.
It looks to me that the xxLocalServiceImpl classes need either the actual array of permissions that should be applied or the addGroup/GuestPermissions flags to be passed in the request:
1
2 if (serviceContext.isAddGroupPermissions() ||
3 serviceContext.isAddGuestPermissions()) {
4
5 addEntryResources(
6 retVal, serviceContext.isAddGroupPermissions(),
7 serviceContext.isAddGuestPermissions());
8 }
9 else {
10 addEntryResources(
11 retVal, serviceContext.getGroupPermissions(),
12 serviceContext.getGuestPermissions());
13 }
When I made the changes described in my original post then the permissions from default.xml were applied when creating the new entry.
Hope this is a better explanation of my issue.
Thanks! Deb