Changes

Jump to navigation Jump to search
49 bytes removed ,  12:54, 8 July 2020
no edit summary
|
* After a fresh installation, {{Code|user:list-details()}} returns output similar to the following one:
<pre classsyntaxhighlight lang="brush:xml">
<user name="admin" permission="admin">
<password algorithm="digest">
</password>
</user>
</presyntaxhighlight>
|-
| '''Errors'''
==user:info==
 
{{Mark|Updated with Version 9.3:}} {{Code|$name}} parameter added.
{| width='100%'
==user:create==
 
{{Mark|Updated with Version 9.3:}} {{Code|$info}} parameter added.
{| width='100%'
|
* {{Code|user:create('John', '7e$j#!1', 'admin')}} creates a new user 'John' with admin permissions.
* {{Code|user:create('Jack', 'top!secret', 'read', 'index*')}} creates a new user 'Jack' with no permissions, but write read permissions for databases starting with the letters 'index'.
|-
| '''Errors'''
|-
| '''Summary'''
|Drops a user with the specified {{Code|$name}}. If non-empty glob {{Code|$patterns}} are specified, only the database patterns will be droppedremoved.
|-
| '''Examples'''
| '''Examples'''
|
* {{Code|user:renamealter('John', 'Jack')}} renames the user 'John' to 'Jack'.
|-
| '''Errors'''
==user:update-info==
 
{{Mark|Updated with Version 9.3:}} {{Code|$name}} parameter added.
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|user:update-info|$info as element(info)|empty-sequence()}}<br/>{{Func|user:update-info|$info as element(info), $name as xs:string|empty-sequence()}}
|-
| '''Summary'''
|Assigns an the specified {{Code|$info }} element to the user management or, if {{Code|$name}} is supplied, to a specific user. This function can be used to manage application-specific data (groups, enhanced user info, etc.).
|-
| '''Examples'''
|
* Store initial groups information:
<pre classsyntaxhighlight lang="brush:xquery">
user:update-info(element info {
for $group in ('editor', 'author', 'writer')
return element group { $group }
})
</presyntaxhighlight>
* Add a group to a specific user:
<pre classsyntaxhighlight lang="brush:xquery">
user:update-info(<info group='editor'/>, 'john')
</presyntaxhighlight>
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu