marklogicml-gradle

Permissions on REST API options with ml-gradle


I have a DHF5 project with some custom options under src/main/ml-modules/options. I'd like to specify permissions for them, but it's not clear how to do so. The mlModulePermissions property doesn't affect their permissions, nor does setting up a permissions.properties file in the options directory. The only permissions showing up are "rest-reader-internal", "read" and "rest-admin-internal", "update".

I'm sure I could write a custom gradle task to update the permissions after they are deployed, but I'm guessing there's some way to do this that I'm missing. How can I specify permissions for REST API options?


Solution

  • The REST API endpoint - http://docs.marklogic.com/REST/POST/v1/config/query/['default'-or-name] - doesn't support specifying permissions, so neither does ml-gradle. It can be achieved via a custom task that alters the permissions after the options have been installed.