Difference between revisions of "Admin Module"
Jump to navigation
Jump to search
| Line 19: | Line 19: | ||
| '''Examples''' | | '''Examples''' | ||
| | | | ||
| + | * {{Code|admin:users()}} returns <code><user permission="admin">admin</user><code> if no additional users have been created. | ||
* {{Code|admin:users("factbook")}} returns all users that have particularly registered for the specified database. | * {{Code|admin:users("factbook")}} returns all users that have particularly registered for the specified database. | ||
|} | |} | ||
| Line 30: | Line 31: | ||
| '''Summary''' | | '''Summary''' | ||
|Returns an element sequence with all currently opened sessions, including the user name, address (IP:port) and an optionally opened database.<br/>The output of this function is similar to the [[Commands#SHOW_SESSIONS|SHOW SESSIONS]] command. | |Returns an element sequence with all currently opened sessions, including the user name, address (IP:port) and an optionally opened database.<br/>The output of this function is similar to the [[Commands#SHOW_SESSIONS|SHOW SESSIONS]] command. | ||
| + | |- | ||
| + | | '''Examples''' | ||
| + | | | ||
| + | * {{Code|admin:sessions()}} may e.g. return <code><session user="admin" database="factbook">127.0.0.1:6286</session></code> | ||
|} | |} | ||
Revision as of 18:58, 23 August 2012
This XQuery Module contains functions for performing operations that are restricted to users with Admin Permissions. Existing users can be listed, and soon more.
Conventions
All functions in this module are assigned to the http://basex.org/modules/admin namespace, which is statically bound to the admin prefix.
All errors are assigned to the http://basex.org/errors namespace, which is statically bound to the bxerr prefix.
Functions
admin:users
| Signatures | admin:users() as element(user)*admin:users($db as item()) as element(user)* |
| Summary | Returns an element sequence, containing all registered users along with their access permissions. If a database node $db is specified, users registered for a particular database will be returned.The output of this function is similar to the SHOW USERS command. |
| Examples |
|
admin:sessions
| Signatures | admin:sessions() as element(session)*
|
| Summary | Returns an element sequence with all currently opened sessions, including the user name, address (IP:port) and an optionally opened database. The output of this function is similar to the SHOW SESSIONS command. |
| Examples |
|
Changelog
The Module was introduced with Version 7.4.