Changes

Jump to navigation Jump to search
267 bytes removed ,  17:53, 21 November 2017
no edit summary
=Conventions=
All functions and errors in this module and errors are assigned to the <code><nowiki>http://basex.org/modules/user</nowiki></code> namespace, which is statically bound to the {{Code|user}} prefix.<br/>
=Read Operations=
==user:list==
 
{{Mark|Updated with Version 8.5}}: If called by non-admins, will only return the current user.
{| width='100%'
==user:list-details==
 
{{Mark|Updated with Version 8.5}}: If called by non-admins, will only return the current user.
{| width='100%'
==user:check==
 
{{Mark|Introduced with Version 8.6}}:
{| width='100%'
==user:info==
 
{{Mark|Introduced with Version 8.6}}:
{| width='100%'
|-
| '''Summary'''
|Returns an <code>info</code> element, which contains usercan be used to organize application-defined informationspecific data. By default, this the element has no contents. It can be modified via [[#user:update-info|user:update-info]].
|-
| '''Examples'''
==user:update-info==
 
{{Mark|Introduced with Version 8.6}}:
{| width='100%'
|-
| '''Summary'''
|Updates the <code>info</code> element with {{Code|$info}}. This node can be used to organize application-specific data (groups and other , enhanced user info, etc.).
|-
| '''Examples'''
let $user := 'john', $pw := '8hKJ@%.c/!0O', $group := 'editor'
return (
dbuser:create($user, $pw),
user:update-info(user:info() update
insert node <user name='{ $user }' group='{ $group }'/> into .
! width="110"|Code
|Description
|-
|{{Code|admin}}
|The "admin" user cannot be modified.
|-
|{{Code|conflict}}
|A user cannot be both altered and dropped.
|-
|{{Code|equal}}
|Name of old and new user is equal.
|-
|{{Code|local}}
|A local permission can only be 'none', 'read' or 'write'.
|-
|{{Code|logged-in}}
|The specified user is currently logged in.
|-
|{{Code|name}}
|The specified user name is invalid.
|-
|{{Code|password}}
|The specified password is wrong.
|-
|{{Code|pattern}}
|{{Code|unknown}}
|The specified user does not exist.
|-
|{{Code|password}}
|The specified password is wrong.
|-
|{{Code|admin}}
|The "admin" user cannot be modified.
|-
|{{Code|equal}}
|Name of old and new user is equal.
|-
|{{Code|local}}
|A local permission can only be 'none', 'read' or 'write'.
|-
|{{Code|logged-in}}
|The specified user is currently logged in.
|-
|{{Code|update}}
|The operation can only be performed once per user or database pattern.
|-
|{{Code|conflict}}
|A user cannot be both altered and dropped.
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu