|
|
sec:amp-add-roles(
|
|
$namespace as xs:string,
|
|
$local-name as xs:string,
|
|
$document-uri as xs:string,
|
|
$database as xs:unsignedLong,
|
|
$role-names as xs:string
|
| ) as empty() |
|
 |
Summary:
Adds the roles ($role-names) to the list of roles granted to the amp
($namespace, $local-name, $document-uri).
|
Parameters:
$namespace
:
Namespace of the function to which the amp applies.
|
$local-name
:
Name of function to which the amp applies.
|
$document-uri
:
URI of the document in which the function is located.
|
$database
:
Database ID in which the module is located. If the module is on
the file system (in the Modules directory), specify
xs:unsignedLong(0).
|
$role-names
:
Roles that should be temporarily assumed while the amp is in effect.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/amp-add-roles
and for role assignment:
http://marklogic.com/xdmp/privileges/grant-all-roles or
http://marklogic.com/xdmp/privileges/grant-my-roles
|
Usage Notes:
If an amp with the given identifiers ($namespace, $local-name,
$document-uri) is not found, an error is returned.
If one of $role-names does not correspond to an existing role,
an error is returned.
If the current user is limited to granting only his/her roles,
and $role is not a subset of the current user's roles, then an error is
returned.
This function must be executed against the security database.
|
|
|
|
sec:amp-get-roles(
|
|
$namespace as xs:string,
|
|
$local-name as xs:string,
|
|
$document-uri as xs:string,
|
|
$database as xs:unsignedLong
|
| ) as xs:string* |
|
 |
Summary:
Returns a sequence of role names for the roles directly assigned to the
amp ($namespace, $local-name, $document-uri).
|
Parameters:
$namespace
:
Namespace of the function to which the amp applies.
|
$local-name
:
Name of function to which the amp applies.
|
$document-uri
:
URI of the document in which the function is located.
|
$database
:
Database ID in which the module is located. If the module is on
the file system (in the Modules directory), specify
xs:unsignedLong(0).
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/amp-get-roles
|
Usage Notes:
If an amp is not found with the given identifiers, an error is
returned.
This function must be executed against the security database.
|
|
|
|
sec:amp-remove-roles(
|
|
$namespace as xs:string,
|
|
$local-name as xs:string,
|
|
$document-uri as xs:string,
|
|
$database as xs:unsignedLong,
|
|
$role-names as xs:string
|
| ) as empty() |
|
 |
Summary:
Removes a role ($role-name) from the set of roles included by the amp
($namespace, $local-name, $document-uri).
|
Parameters:
$namespace
:
Namespace of the function to which the amp applies.
|
$local-name
:
Name of function to which the amp applies.
|
$document-uri
:
URI of the document in which the function is located.
|
$database
:
Database ID in which the module is located. If the module is on
the file system (in the Modules directory), specify
xs:unsignedLong(0).
|
$role-names
:
Roles that should be temporarily assumed while the amp is in effect.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/amp-remove-roles
and for role removal:
http://marklogic.com/xdmp/privileges/grant-all-roles or
http://marklogic.com/xdmp/privileges/grant-my-roles
|
Usage Notes:
If one of $role-names does not correspond to an existing role,
an error is returned.
If an amp idnetified by ($namespace, $local-name, $document-uri)
is not found then an error is returned.
If the current user is limited to granting only his/her roles,
and $role-name is not a subset of the current user's roles, then an
error is returned.
This function must be executed against the security database.
|
|
|
|
sec:amp-set-roles(
|
|
$namespace as xs:string,
|
|
$local-name as xs:string,
|
|
$document-uri as xs:string,
|
|
$database as xs:unsignedLong,
|
|
$role-names as xs:string
|
| ) as empty() |
|
 |
Summary:
Assigns the amp identified by $namespace, $local-name and $document-uri
to have the roles identified by $roles-names. Removes previously
assigned roles.
If an amp with the given identifiers does not exist, an error is
returned.
If a role name in $role-names does not correspond to an existing role,
an error is returned.
If $role-names is the empty sequence, all roles assigned to the amp are
removed.
If the current user is limited to granting only his/her roles,
and $role-names is not a subset of the current user's roles, then an
error is returned.
|
Parameters:
$namespace
:
Namespace of the function to which the amp applies.
|
$local-name
:
Name of function to which the amp applies.
|
$document-uri
:
URI of the document in which the function is located.
|
$database
:
Database ID in which the module is located. If the module is on
the file system (in the Modules directory), specify
xs:unsignedLong(0).
|
$role-names
:
Roles that should be temporarily assumed while the amp is in effect.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/amp-set-roles
and for role assignment:
http://marklogic.com/xdmp/privileges/grant-all-roles or
http://marklogic.com/xdmp/privileges/grant-my-roles
|
Usage Notes:
This function must be executed against the security database.
|
|
|
|
sec:collection-add-permissions(
|
|
$uri as xs:string,
|
|
$permissions as element(sec:permission)*
|
| ) as element(sec:permission)* |
|
 |
Summary:
Add the permissions $permissions to the protected collection identified
by $uri.
|
Parameters:
$uri
:
The URI of a collection.
|
$permissions
:
New permissions to add to that protected collection. If $permissions is
the empty sequence, the function will have no effect.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/collection-add-permissions
|
Usage Notes:
If a protected collection with uri equal to $uri is not found,
an error is raised.
This function must be executed against the security database.
|
|
|
|
sec:collection-get-permissions(
|
|
$uri as xs:string
|
| ) as element(sec:permission)* |
|
 |
Summary:
Returns a sequence of permission elements corresponding to the
current permissions granted to the protected collection identified
by $uri.
|
Parameters:
$uri
:
The URI of a collection.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/collection-get-permissions
|
Usage Notes:
If a protected collection with uri equal to $uri is not found,
an error is raised.
This function must be executed against the security database.
|
|
|
|
sec:collection-remove-permissions(
|
|
$uri as xs:string,
|
|
$permissions as element(sec:permission)*
|
| ) as element(sec:permission)* |
|
 |
Summary:
Removes the permissions $permissions from the protected collection
identified by $uri.
|
Parameters:
$uri
:
The URI of a collection.
|
$permissions
:
Permissions to be removed from that protected collection. If $permissions
is the empty sequence, the function will have no effect.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/collection-remove-permissions
|
Usage Notes:
If a protected collection with uri equal to $uri is not found,
an error is raised.
This function must be executed against the security database.
|
|
|
|
sec:collection-set-permissions(
|
|
$uri as xs:string,
|
|
$permissions as element(sec:permission)*
|
| ) as element(sec:permission)* |
|
 |
Summary:
Sets the permissions of a protected collection identified by $uri to
$permissions.
|
Parameters:
$uri
:
The URI of a collection.
|
$permissions
:
New permissions. If the empty sequence is provided, deletes the existing
permissions.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/collection-set-permissions
|
Usage Notes:
If a protected collection with uri equal to $uri is not found,
an error is raised.
This function must be executed against the security database.
|
|
|
|
sec:create-amp(
|
|
$namespace as xs:string,
|
|
$local-name as xs:string,
|
|
$document-uri as xs:string,
|
|
$database as xs:unsignedLong,
|
|
$role-names as xs:string*
|
| ) as xs:unsignedLong |
|
 |
Summary:
Creates a new amp in the system database for the context
database.
If the tuple ($namespace, $local-name, $document-uri, $database)
is not unique, an error is returned. >
If one of the $role-names does not identify a role, an error
is returned.
If the current user is limited to granting only his/her roles,
and $role-names is not a subset of the current user's roles,
then an error is returned.
Returns the amp-id.
|
Parameters:
$namespace
:
Namespace of the function to which the amp applies.
|
$local-name
:
Name of function to which the amp applies.
|
$document-uri
:
URI of the module in which the function is located.
|
$database
:
Database ID in which the module is located. If the module is on
the file system (in the Modules directory), specify
xs:unsignedLong(0).
|
$role-names
:
Roles that should be temporarily assumed while the amp is in effect.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/create-amp
and for role assignment:
http://marklogic.com/xdmp/privileges/grant-all-roles or
http://marklogic.com/xdmp/privileges/grant-my-roles
|
Usage Notes:
This function must be executed against the security database.
|
|
|
|
sec:create-privilege(
|
|
$privilege-name as xs:string,
|
|
$action as xs:string,
|
|
$kind as xs:string,
|
|
$role-names as xs:string*
|
| ) as xs:unsignedLong |
|
 |
Summary:
Creates a new privilege and returns the new privilege-id.
If $action is not unique, an error is returned.
If $kind is not one of ("execute", "uri") then en error is
returned.
If one of the $role-names names a role that does not exist, an error
is returned.
If the current user is limited to granting only his/her roles,
and $role-names is not a subset of the current user's roles, then an
error is returned.
|
Parameters:
$privilege-name
:
The name of the privilege to create (unique within security database).
|
$action
:
Action protected by this
privilege. For an Execute Privilege, this is usually a URI describing
an activity. For a URI Privilege, this is a base URI used to filter
database activities with certain document URIs.
|
$kind
:
Either "execute" or "uri".
|
$role-names
:
The names of the roles which can perform this action.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/create-privilege
and for role assignment:
http://marklogic.com/xdmp/privileges/grant-all-roles or
http://marklogic.com/xdmp/privileges/grant-my-roles
|
Usage Notes:
This function must be executed against the security database.
|
|
|
|
sec:create-role(
|
|
$role-name as xs:string,
|
|
$description as xs:string?,
|
|
$role-names as xs:string*,
|
|
$permissions as element(sec:permission)*,
|
|
$collections as xs:string*
|
| ) as xs:unsignedLong |
|
 |
Summary:
Creates a new role in the system database for the context
database.
If $role-name is not unique, an error is returned.
If one of the $role-names does not identify a role, an error
is returned.
If the current user is limited to granting only his/her roles,
and $role-names is not a subset of the current user's roles, then an
error is returned.
Returns the role-id.
|
Parameters:
$role-name
:
The name of the role to be created.
|
$description
:
A description of the role to be created.
|
$role-names
:
A sequence of role names to which the role is assigned.
|
$permissions
:
The default permissions for the role.
|
$collections
:
The default collections for the role.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/create-role
and for role assignment:
http://marklogic.com/xdmp/privileges/grant-all-roles or
http://marklogic.com/xdmp/privileges/grant-my-roles
|
Usage Notes:
This function must be executed against the security database.
|
|
|
|
sec:create-user(
|
|
$user-name as xs:string,
|
|
$description as xs:string?,
|
|
$password as xs:string,
|
|
$role-names as xs:string*,
|
|
$permissions as element(sec:permission)*,
|
|
$collections as xs:string*
|
| ) as xs:unsignedLong |
|
 |
Summary:
Creates a new user in the system database for the context database.
Returns the user ID of the created user.
|
Parameters:
$user-name
:
A unique username.
If $user-name is not unique, an error is returned.
|
$description
:
A description of the
user.
|
$password
:
The initial password
for this user.
|
$role-names
:
The roles (if any)
assigned to this user. If one of the $role-names names a role that does
not exist, an error is returned.
|
$permissions
:
The default permissions granted to this user.
|
$collections
:
The default collections to which this user has access.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/create-user
and, for role assignment:
http://marklogic.com/xdmp/privileges/grant-all-roles or
http://marklogic.com/xdmp/privileges/grant-my-roles
|
Usage Notes:
This function must be executed against the security database.
|
|
|
|
sec:create-user-with-role(
|
|
$user-name as xs:string,
|
|
$description as xs:string?,
|
|
$password as xs:string,
|
|
$role-names as xs:string*,
|
|
$permissions as element(sec:permission)*,
|
|
$collections as xs:string*
|
| ) as xs:unsignedLong |
|
 |
Summary:
Creates a new user in the system database for the context database.
Returns the user ID of the created user. Also creates a role by the
same name and assigns the newly-created user to the newly-created role.
Parameters that define roles, permissions, and collections are only applied
to the new user.
|
Parameters:
$user-name
:
A unique username.
If $user-name is not unique, an error is returned.
|
$description
:
A description of the
user.
|
$password
:
The initial password
for this user.
|
$role-names
:
The roles (if any)
assigned to this user. If one of the $role-names names a role that does
not exist, an error is returned.
|
$permissions
:
The default permissions granted to this user.
|
$collections
:
The default collections to which this user has access.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/create-user
http://marklogic.com/xdmp/privileges/create-role
and, for role assignment:
http://marklogic.com/xdmp/privileges/grant-all-roles or
http://marklogic.com/xdmp/privileges/grant-my-roles
|
Usage Notes:
This function must be executed against the security database.
|
|
|
|
sec:get-collection(
|
|
$uri as xs:string
|
| ) as element(sec:collection) |
|
 |
Summary:
Gets the security document corresponding to a protected collection with
uri equal to $uri.
|
Parameters:
$uri
:
The URI of a collection.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/unprotect-collection
or
http://marklogic.com/xdmp/privileges/collection-set-permissions
or
http://marklogic.com/xdmp/privileges/collection-add-permissions
or
http://marklogic.com/xdmp/privileges/collection-remove-permissions
|
Usage Notes:
If a protected collection with uri equal to $uri is not found,
an error is raised.
This function must be executed against the security database.
|
|
|
|
sec:privilege-set-roles(
|
|
$action as xs:string,
|
|
$kind as xs:string,
|
|
$role-names as xs:string*
|
| ) as empty() |
|
 |
Summary:
Assigns the privilege ($action,$kind) to have the roles identified by
$role-names. Removes the prviously assigned roles.
If a privilege identified by ($action,$kind) is not found, an error is
returned.
If a role name in $role-names does not correspond to an existing role,
an error is returned.
If $role-names is the empty sequence, all existing roles for the privilege
are removed.
If the current user is limited to granting only his/her roles,
and $role-names is not a subset of the current user's roles, then an error
is returned.
|
Parameters:
$action
:
The action for the privilege.
|
$kind
:
Either "execute" or "uri".
|
$role-names
:
New roles that can perform this action. All previously assigned roles
will be removed. If $role-names is the empty sequence, the privilege
will have no roles assigned.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/privilege-set-roles
and for role assignment ($role-names not empty sequence):
http://marklogic.com/xdmp/privileges/grant-all-roles or
http://marklogic.com/xdmp/privileges/grant-my-roles
|
Usage Notes:
This function must be executed against the security database.
|
|
|
|
sec:protect-collection(
|
|
$uri as xs:string,
|
|
$permissions as element(sec:permission)*
|
| ) as xs:unsignedLong |
|
 |
Summary:
Protects a collection $uri with the given permissions
($permissions). Returns the unique id of the protected collection.
|
Parameters:
$uri
:
The URI of a collection.
|
$permissions
:
Permissions governing the collection.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/protect-collection
|
Usage Notes:
If $uri is empty or can not be cast as an xs:AnyURI, an error
is raised.
If a collection with the same uri is already protected, an
error is raised.
This function must be executed against the security database.
|
|
|
|
sec:remove-amp(
|
|
$namespace as xs:string,
|
|
$local-name as xs:string,
|
|
$document-uri as xs:string,
|
|
$database as xs:unsignedLong
|
| ) as empty() |
|
 |
Summary:
Removes the amp ($namespace, $local-name, $document-uri, $database) and returns
true after completion.
|
Parameters:
$namespace
:
The namespace of the function to which the amp applies.
|
$local-name
:
The name of the function to which the amp applies.
|
$document-uri
:
The URI of the module in which the function is located.
|
$database
:
Database ID in which the module is located. If the module is on
the file system (in the Modules directory), specify
xs:unsignedLong(0).
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/remove-amp
|
Usage Notes:
If an amp ($namespace, $local-name, $document-uri) is not found,
an error is returned.
This function must be executed against the security database.
|
|
|
|
sec:role-get-default-collections(
|
|
$role-name as xs:string
|
| ) as xs:string* |
|
 |
Summary:
Returns a sequence of strings correspondinig to the uri's of the role's
default collections.
|
Parameters:
$role-name
:
The name of a role.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/role-get-default-collections
|
Usage Notes:
If a role with name $role-name is not found, an error is
raised.
This function must be executed against the security database.
|
|
|
|
sec:role-get-default-permissions(
|
|
$role-name as xs:string
|
| ) as element(sec:permission)* |
|
 |
Summary:
Returns a sequence of permission elements correspondinig to the role's
default permissions.
|
Parameters:
$role-name
:
The name of a role.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/role-get-default-permission
|
Usage Notes:
If a role with name $role-name is not found, an error is
raised.
This function must be executed against the security database.
|
|
|
|
sec:role-get-description(
|
|
$role-name as xs:string
|
| ) as xs:string |
|
 |
Summary:
Returns the description for the specified role.
|
Parameters:
$role-name
:
The name of the role.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/role-get-description
|
Usage Notes:
If a role with name equal to $role-name is not found, an error
is returned.
This function must be executed against the security database.
|
|
|
|
sec:role-get-roles(
|
|
$role-name as xs:string
|
| ) as xs:string* |
|
 |
Summary:
Returns a sequence of role names for the roles directly assigned to
the given role ($role-name).
|
Parameters:
$role-name
:
The name of a role.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/role-get-roles
|
Usage Notes:
If a role with name equal to $role-name is not found, an error is
returned.
To find all of the roles this role inherits (that is, the
roles assigned directly to this role, the roles assigned to those
roles, and so on), use the xdmp:role-roles built-in
function.
This function must be executed against the security database.
|
|
|
|
sec:role-privileges(
|
|
$role-name as xs:string
|
| ) as element(sec:privilege)* |
|
 |
Summary:
Returns a set of privilege elements corresponding to all privileges
that a role has. (Roles are flattened to give a complete set of
privileges).
|
Parameters:
$role-name
:
The name of a role.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/role-privileges
if the current role is not $role-name.
|
Usage Notes:
If a role with name equal to $role-name is not found, an
error is raised.
This function must be executed against the security database.
|
|
|
|
sec:role-set-default-collections(
|
|
$role-name as xs:string,
|
|
$collections as xs:string*
|
| ) as empty() |
|
 |
Summary:
Sets the default collections of a role with name $role-name to
$collections.
|
Parameters:
$role-name
:
The name of a role.
|
$collections
:
A sequence of collections.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/role-set-default-collections
|
Usage Notes:
If a role with name $role-name is not found, an error is
raised.
This function must be executed against the security database.
|
|
|
|
sec:role-set-default-permissions(
|
|
$role-name as xs:string,
|
|
$permissions as element(sec:permission)*
|
| ) as empty() |
|
 |
Summary:
Sets the default permissions for a role with name $role-name.
|
Parameters:
$role-name
:
The name of the role to which the default permissions are set.
|
$permissions
:
New permissions. If the empty sequence is provided, deletes the
existing permissions.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/role-set-default-permissions
|
Usage Notes:
If a role with name $role-name is not found, an error is
raised.
This function must be executed against the security database.
|
|
|
|
sec:unprotect-collection(
|
|
$uri as xs:string
|
| ) as empty() |
|
 |
Summary:
Removes the protection of a collection $uri. This
does not remove the collection or any of its documents.
|
Parameters:
$uri
:
The URI of the collection from which to remove protections.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/unprotect-collection
|
Usage Notes:
If a protected collection with uri equal to $uri is not found,
an error is raised.
This function must be executed against the security database.
|
|
|
|
sec:user-add-roles(
|
|
$user-name as xs:string,
|
|
$role-names as xs:string*
|
| ) as empty() |
|
 |
Summary:
Adds the roles ($role-names) to the list of roles granted to the
user ($user-name).
If a user with name equal to $user-name is not found, an
error is returned.
If one of the $role-names does not correspond to an
existing role, an error is returned.
If the current user is limited to granting only his/her roles,
and $role is not a subset of the current user's roles, then
an error is returned.
|
Parameters:
$user-name
:
The name of a user.
|
$role-names
:
A sequence of role names.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/user-add-roles
and for role assignment:
http://marklogic.com/xdmp/privileges/grant-all-roles or
http://marklogic.com/xdmp/privileges/grant-my-roles
|
Usage Notes:
This function must be executed against the security database.
|
|
|
|
sec:user-get-default-collections(
|
|
$user-name as xs:string
|
| ) as xs:string* |
|
 |
Summary:
Returns a sequence of strings correspondinig to the uri's of the user's
default collections.
|
Parameters:
$user-name
:
The name of a user.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/user-get-default-collections
|
Usage Notes:
If a user with name $user-name is not found, an error is
raised.
This function must be executed against the security database.
|
|
|
|
sec:user-get-default-permissions(
|
|
$user-name as xs:string
|
| ) as element(sec:permission)* |
|
 |
Summary:
Returns a sequence of permission elements correspondinig to the user's
default permissions.
|
Parameters:
$user-name
:
The name of a user.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/user-get-default-permission
|
Usage Notes:
If a user with name $user-name is not found, an error is
raised.
This function must be executed against the security database.
|
|
|
|
sec:user-privileges(
|
|
$user-name as xs:string
|
| ) as element(sec:privilege)* |
|
 |
Summary:
Returns a set of privilege elements corresponding to all privileges
that a user has. (roles are flattened to give a complete set of
privileges).
|
Parameters:
$user-name
:
The name of a user.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/user-privileges
if the current user is not $user-name.
|
Usage Notes:
If a user with name equal to $user-name is not found, an error
is raised.
This function must be executed against the security database.
|
|
|
|
sec:user-remove-roles(
|
|
$user-name as xs:string,
|
|
$role-names as xs:string*
|
| ) as empty() |
|
 |
Summary:
Removes the roles ($role-names) from the list of roles granted to the
user ($user-name).
If a user with name equal to $user-name is not found, an error is
returned.
If one of $role-names does not correspond to an existing role,
an error is returned.
If the current user is limited to granting only his/her roles,
and one of $role-names is not a subset of the current user's roles,
then an error is returned.
|
Parameters:
$user-name
:
The name of a user.
|
$role-names
:
A sequence of role names.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/remove-role-from-user
and for role removal:
http://marklogic.com/xdmp/privileges/grant-all-roles or
http://marklogic.com/xdmp/privileges/grant-my-roles
|
Usage Notes:
This function must be executed against the security database.
|
|
|
|
sec:user-set-default-collections(
|
|
$user-name as xs:string,
|
|
$collections as xs:string*
|
| ) as empty() |
|
 |
Summary:
Sets the default collections of a user with name $user-name to
$collections.
|
Parameters:
$user-name
:
The name of a user.
|
$collections
:
A sequence of collections.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/user-set-default-collections
|
Usage Notes:
If a user with name $user-name is not found, an error is
raised.
This function must be executed against the security database.
|
|
|
|
sec:user-set-default-permissions(
|
|
$user-name as xs:string,
|
|
$permissions as element(sec:permission)*
|
| ) as empty() |
|
 |
Summary:
Sets the default permissions for a user with name $user-name.
|
Parameters:
$user-name
:
The name of the user.
|
$permissions
:
New permissions. If the empty sequence is provided, deletes the
existing permissions.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/user-set-default-permissions
|
Usage Notes:
If a user with name $user-name is not found, an error is
raised.
This function must be executed against the security database.
|
|
|
|
sec:user-set-name(
|
|
$user-name as xs:string,
|
|
$new-user-name as xs:string,
|
|
$password as xs:string
|
| ) as empty() |
|
 |
Summary:
Changes the name of the user from $user-name to $new-user-name.
|
Parameters:
$user-name
:
The existing name of the user.
|
$new-user-name
:
The new name of the user.
|
$password
:
The password to set for the user. This can be either the original password
for the user or a new password.
|
|
Required Privilege:
http://marklogic.com/xdmp/privileges/user-set-name if
the currrent user is not $user-name.
|
Usage Notes:
If a user with name equal to $user-name is not found, an error is
returned.
If $new-user-name is not unique, an error is returned.
This function must be executed against the security database.
|
|
|