I have a requirement where I want to hide the delete action in the share document library under certain circumstances. Those circumstances makes it impossible for me to use the property decorator extension mechanism in an effective way. (A source associated node should have a certain status).
Browsing the docs of how to extend the document library of Alfresco Share there is something described as "Permission List" (http://docs.alfresco.com/4.2/concepts/doclib-repository-tier.html) (heading 3)
I cannot figure how to use this extension mechanism in a proper way. I want to be able to lookup some things with the nodeService in the repository tier, and in some cases remove the Delete permission from the returned permission list.
[update] My first thought was of course to use a custom evaluator as proposed by @mitpatoliya in his answer, that based on the json returned from the server evaluates if the delete option should be present. However my requirement was to hide the option if a certain source associated node had a specific property value. To do this I would have to do a remote REST call from the evaluator code. This was something I wanted to avoid if I could.
Well I don't know if this is the intended way to do this, but I subclassed the JSONConversionComponent.userPermissionsToJSON method, and made it work.