-
Notifications
You must be signed in to change notification settings - Fork 20
Roles
Roles are a more complex resource to deploy via the Manage API. That roles can depend on each other and also on themselves (via default permissions) means that care must be taken to deploy them in the correct order.
This page will eventually document all the concerns for deploying roles, but in the meantime, please see the source code for DeployRolesCommand to understand the various issues that must be handled.
MarkLogic 10.0-7 supports defining capability queries as part of a role. However, a MarkLogic bug identified in #441 prevents a JSON payload from containing capability queries. So for the time being, you must use an XML payload. But an XML payload runs into a separate issue with capability queries when the role is deployed via CMA (the Configuration Management API).
Thus, in order for an XML payload to be deployed, you must disable CMA usage for roles. In ml-gradle, that is done via the following property:
mlDeployRolesWithCma=false
Or just turn off all CMA usage:
mlDeployWithCma=false
If you're using ml-app-deployer libraries directly, you can do the following your with AppConfig instance:
appConfig.getCmaConfig().setDeployRoles(false);