1

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?

Dave Cassel
  • 8,352
  • 20
  • 38

1 Answers1

1

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.

rjrudin
  • 2,108
  • 9
  • 7
  • Here is an example task https://github.com/marklogic-community/grove-ml-gradle/blob/master/build.gradle#L49, which invokes https://github.com/marklogic-community/grove-ml-gradle/blob/master/ml-modules/root/admin/fix-permissions.xqy to perform post-deploy adjustments on module permissions. – grtjn Jul 05 '19 at 07:38