Hi,
I am not certain if this was intentional but the format of GetAclServlet was 
changed by [1].

Previously the format was a map keyed by principalid, now its an array 
containing objects.

I can understand that an array maintains the order of the ACE's in the ACL 
which is required by parts of SLING-1458, however its not backwards compatible 
and breaks all existing clients that were expecting a map. Since that might be 
quite a lot of code, embedded in Client side Javascript apps and server side 
http clients, wouldn't it be better to provide keep the format and add a 
sequence number to the map objects? , eg

Old format:

{"user1-1274468817" : {"granted":["jcr:read"]}}

New format
[{"principal":"user1-1274468817","granted":["jcr:read"]}]

Suggested new format
{"user1-1274468817" : {"granted":["jcr:read"], "sequence": 0}}


I know the suggested new format is not as natural, however it won't require all 
clients to recode.

If we really do want to migrate to an array, then a new selector might be the 
way.
eg ..../node.aclarray.json


WDYT ?

Ian



1 http://svn.apache.org/viewvc?view=revision&revision=927532


Reply via email to