Using the repository extension from the files UserInfoCustomResponse.java
and fme-user-info-context.xml
you can add custom doclib metadata as a json object. This data will be pulled into the browser with Share's DocLib XHR request and can be used to configure or extend the document library.
To use the custom data in a Share document library action evaluator you can write an evaluator in as shown in the file FmeGroupEvaluator.java