Difference between revisions of "User Management"

From BaseX Documentation
Jump to navigation Jump to search
Line 37: Line 37:
 
==Commands and Permissions table==
 
==Commands and Permissions table==
  
<table>
+
{| border="1" cellpadding="20" cellspacing="0"
<tr><th>Command</th><th>Needed Permission</th></tr>
+
!Command
</table>
+
!Needed Permission
 +
|-
 +
|Orange
 +
|Apfel
 +
|-
 +
|Brot
 +
|Torte
 +
|-
 +
|Butter
 +
|Eis
 +
|}

Revision as of 11:14, 7 December 2010

User Management

Admin permissions are needed to execute one of the following processes.

Creating user 'test' with password 'test'

> CREATE USER test test

As global permissions, you can set 'none', 'read', 'write', 'create' and 'admin':

Revoking all global permissions from user 'test'

> GRANT none TO test

Valid local permissions are 'none', 'read' and 'write':

Granting write permission on database 'factbook' to user 'test'

> GRANT write ON factbook TO test

Note: Local permissions overwrite global permissions. As a consequence, the 'test' user will only be allowed to access (i.e., read and write) the 'factbook' database. If no local permissions are set, the global rights are inherited.

Showing global permissions

> SHOW USERS

Showing local permissions on database 'factbook'

> SHOW USERS ON factbook

Dropping of user 'test'

> DROP USER test

Permissions hierarchy

Permissions hierarchy

Commands and Permissions table

Command Needed Permission
Orange Apfel
Brot Torte
Butter Eis