Changes

Jump to navigation Jump to search
597 bytes added ,  12:10, 22 July 2019
no edit summary
==user:info==
 
{{Mark|Updated with Version 9.3:}} {{Code|$name}} parameter added.
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|user:info||element(info)}}<br/>{{Func|user:info|$name as xs:string|element(info)}}
|-
| '''Summary'''
|Returns an <code>info</code> element, which can be used to organize may contain application-specific data. If a user {{Code|$name}} is supplied, a user-specific element is returned. By default, the returned element has no contents. It can be modified via [[#user:update-info|user:update-info]].
|-
| '''Examples'''
==user:create==
 
{{Mark|Updated with Version 9.3:}} {{Code|$info}} parameter added.
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|user:create|$name as xs:string, $password as xs:string|empty-sequence()}}<br/>{{Func|user:create|$name as xs:string, $password as xs:string, $permissions as xs:string*|empty-sequence()}}<br/>{{Func|user:create|$name as xs:string, $password as xs:string, $permissions as xs:string*, $patterns as xs:string*|empty-sequence()}}<br/>{{Func|user:create|$name as xs:string, $password as xs:string, $permissions as xs:string*, $patterns as xs:string*, $info as element(info)|empty-sequence()}}
|-
| '''Summary'''
|Creates a new user with the specified {{Code|$name}}, {{Code|$password}}, and {{Code|$permissions}}. :* Local permissions are granted with non-empty glob {{Code|$patterns}}. * An {{Code|$info}} element with application-specific information can be supplied.* The default global permission (''none'') can be overwritten with an empty pattern or by omitting the last argument. * Existing users will be overwritten.
|-
| '''Examples'''
==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/>
|-
| '''Summary'''
|Updates the <code>Assigns an info</code> element with to the user management or, if {{Code|$infoname}}is supplied, to a specific user. This node function can be used to organize manage application-specific data (groups, enhanced user info, etc.).
|-
| '''Examples'''
})
</pre>
* Assign Add a group to a new specific user:
<pre class="brush:xquery">
let $user := 'john', $pw := '8hKJ@%.c/!0O', $group := 'editor'return ( user:create($user, $pw), user:update-info(user:<info() update insert node <user name='{ $user }' group='{ $group }editor'/> into . ), 'john')
</pre>
|}
=Changelog=
 
;Version 8.6
* Updated: [[#user:info|user:info]], [[#user:update-info|user:update-info]]: {{Code|$name}} parameter added.
;Version 8.6
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu