Difference between revisions of "User Module"
Jump to navigation
Jump to search
(Created page with "This XQuery Module contains functions for creating and administering database users. =Conventions= All functions in this module are assigned to the {{Code|ht...") |
|||
Line 1: | Line 1: | ||
− | This [[Module Library|XQuery Module]] contains functions for creating and administering database users. | + | This [[Module Library|XQuery Module]] contains functions for creating and administering database users. The [[User Management]] article gives more information on database users and permissions. |
=Conventions= | =Conventions= | ||
Line 47: | Line 47: | ||
</user> | </user> | ||
</pre> | </pre> | ||
+ | |} | ||
+ | |||
+ | =Errors= | ||
+ | |||
+ | {| class="wikitable" width="100%" | ||
+ | ! width="110"|Code | ||
+ | |Description | ||
+ | |- | ||
+ | |{{Code|BXUS0001}} | ||
+ | |The specified user name is invalid. | ||
+ | |- | ||
+ | |{{Code|BXUS0002}} | ||
+ | |The specified database name is invalid. | ||
+ | |- | ||
+ | |{{Code|BXUS0003}} | ||
+ | |The specified permission is invalid. | ||
+ | |- | ||
+ | |{{Code|BXUS0004}} | ||
+ | |The specified user does not exist. | ||
+ | |- | ||
+ | |{{Code|BXUS0005}} | ||
+ | |The "admin" user cannot be modified. | ||
+ | |- | ||
+ | |{{Code|BXUS0006}} | ||
+ | |Name of old and new user is equal. | ||
+ | |- | ||
+ | |{{Code|BXUS0007}} | ||
+ | |A local permission can only be 'none', 'read' or 'write'. | ||
+ | |- | ||
+ | |{{Code|BXUS0008}} | ||
+ | |A specified user is currently logged in. | ||
+ | |- | ||
+ | |{{Code|BXUS0009}} | ||
+ | |A user, or its associated permission, can only be created, modified or dropped once. | ||
+ | |- | ||
+ | |{{Code|BXUS0010}} | ||
+ | |A user cannot be both altered and dropped. | ||
|} | |} | ||
Revision as of 23:50, 10 December 2014
This XQuery Module contains functions for creating and administering database users. The User Management article gives more information on database users and permissions.
Conventions
All functions in this module are assigned to the http://basex.org/modules/user
namespace, which is statically bound to the user
prefix.
All errors are assigned to the http://basex.org/errors
namespace, which is statically bound to the bxerr
prefix.
Functions
user:list
Signatures | user:list() as xs:string* |
Summary | Returns the names of all registered users. |
Examples |
|
user:list-details
Signatures | user:list-details() as element(user)* |
Summary | Returns an element sequence, containing all registered users, their permissions, and their encoded password strings. The SHOW USERS command yields similar output. |
Examples |
<user name="admin" permission="admin"> <password algorithm="digest"> <hash>304bdfb0383c16f070a897fc1eb25cb4</hash> </password> <password algorithm="salted-sha256"> <salt>871602799292195</salt> <hash>a065ca66fa3d6da5762c227587f1c8258c6dc08ee867e44a605a72da115dcb41</hash> </password> </user> |
Errors
Code | Description |
---|---|
BXUS0001
|
The specified user name is invalid. |
BXUS0002
|
The specified database name is invalid. |
BXUS0003
|
The specified permission is invalid. |
BXUS0004
|
The specified user does not exist. |
BXUS0005
|
The "admin" user cannot be modified. |
BXUS0006
|
Name of old and new user is equal. |
BXUS0007
|
A local permission can only be 'none', 'read' or 'write'. |
BXUS0008
|
A specified user is currently logged in. |
BXUS0009
|
A user, or its associated permission, can only be created, modified or dropped once. |
BXUS0010
|
A user cannot be both altered and dropped. |
Changelog
The Module was introduced with Version 8.0.