Class ACLJsonEnricher

  • All Implemented Interfaces:
    Marshaller<Enriched<DocumentModel>>, Writer<Enriched<DocumentModel>>

    @Setup(mode=SINGLETON,
           priority=2000)
    public class ACLJsonEnricher
    extends AbstractJsonEnricher<DocumentModel>
    Enrich DocumentModel Json.

    Add DocumentModel's ACP as json attachment.

    Enable if parameter enrichers-document=acls is present.

    Format is:

     
     {
       "entity-type":"document",
       ...
       "contextParameters": {
         "acls": [
           {
             "name": "inherited",
             "aces" :[
               {
                 "username": "administrators",
                 "permission": "Everything",
                 "granted": true,
                 "creator": "Administrator",
                 "begin": "2014-10-19T09:16:30.291Z",
                 "end": "2016-10-19T09:16:30.291Z"
                 "notify": true // optional
                 "comment": "" // optional
               },
               ...
             ]
           },
           ...
         ]
       }
     }
     
     

    username and creator property can be fetched with fetch.acls=username or fetch.acls=creator.

    Additional ACE fields (such as notify and notification comment) can be written by using fetch.acls=extended.

    Since:
    7.2
    See Also:
    NuxeoPrincipalJsonWriter, NuxeoGroupJsonWriter