code: function replacePermission() {
    var permission = getPermission(
        mlutil.asArray.apply(null, arguments)
        );
    if (permission === null) {
      throw new Error('permissions.replace() takes the role name and one or more insert|update|read|execute capabilities');
    }
    return replace(
        '/permissions[node("role-name") eq "'+permission['role-name']+'"]',
        permission
        );
  }
docs: Specifies different capabilities for a role with permissions on a document;
  takes a configuration object with the following named parameters or,
  as a shortcut, a role string and capabilities string or array.
  @method patchBuilderPermissions#replace
  @since 1.0
  @param {string} role - the name of an existing role with permissions
  on the document
  @param {string|string[]} capabilities - the role's modified capability or
  capabilities from the insert|update|read|execute enumeration