enapps-enorman opened a new pull request #13:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/13


   For: [SLING-10192](https://issues.apache.org/jira/browse/SLING-10192)
   
   Use Case: repoinit should be able to set properties on users and groups that 
were just created
   
   The solution here could be similar to how SLING-8757 added the syntax to set 
ACL on the user home folder but for the "set properties" action.
   
   I'm thinking of a path syntax of authorizable(id) instead of home(id) to 
maintain the abstraction between the Authorizable apis and the where those are 
stored. 
   
   The syntax would look something like this:
   ```
   # set properties on user or group profile
   set properties on authorizable(alice),authorizable(grpA)
     set pathArray to /d/e/f/*, m/n/*
     default someInteger{Long} to 42
     set someFlag{Boolean} to true
     default someDate{Date} to "2020-03-19T11:39:33.437+05:30"
     set customSingleValueStringProp to test
     set customSingleValueQuotedStringProp to "hello, you!"
     set stringArray to test1, test2
     default someInteger{Long} to 65
     set quotedA to "Here's a \"double quoted string\" with suffix"
     set quotedMix to "quoted", non-quoted, "the last \" one"
     set nested/someInteger{Long} to 42
   end
   
   # set properties on a subtree of the user or group profile
   set properties on authorizable(bob)/nested,authorizable(grpB)/nested
     set pathArray to /d/e/f/*, m/n/*
     default someInteger{Long} to 42
     set someFlag{Boolean} to true
     default someDate{Date} to "2020-03-19T11:39:33.437+05:30"
     set customSingleValueStringProp to test
     set customSingleValueQuotedStringProp to "hello, you!"
     set stringArray to test1, test2
     default someInteger{Long} to 65
     set quotedA to "Here's a \"double quoted string\" with suffix"
     set quotedMix to "quoted", non-quoted, "the last \" one"
     set nested/someInteger{Long} to 42
   end
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to