xdmp.canGrantRoles( roles as String[] ) as null
Tests whether a user can grant or revoke a set of roles. Raises an error if the session user can not.
xdmp.canGrantRoles(["development", "qa"]);