public final class Users extends Object
Constructor and Description |
---|
Users(StaticOptions sopts)
Constructor for global users.
|
Modifier and Type | Method and Description |
---|---|
void |
alter(User user,
String name)
Renames a user.
|
void |
create(String name,
String password,
Perm perm)
Stores a user and encrypted password.
|
boolean |
drop(User user,
String pattern)
Drops a user from the list.
|
String[] |
find(Pattern pattern)
Returns all user names that match the specified pattern.
|
User |
get(String name)
Returns user with the specified name.
|
Table |
info(String db)
Returns table with all users, or users from a specified database.
|
void |
password(User user,
String password)
Changes the password of a user.
|
static void |
perm(User user,
Perm prm,
String pattern)
Sets the permission of a user.
|
String |
toString() |
ArrayList<User> |
users(String db)
Returns all users, or users from a specified database.
|
void |
write()
Writes permissions to disk.
|
public Users(StaticOptions sopts)
sopts
- static optionspublic void write()
public void create(String name, String password, Perm perm)
name
- user namepassword
- password (plain text)perm
- permission (can be null
)public void password(User user, String password)
user
- userpassword
- passwordpublic static void perm(User user, Perm prm, String pattern)
user
- userprm
- permissionpattern
- database pattern (can be null
)public void alter(User user, String name)
user
- user referencename
- new namepublic boolean drop(User user, String pattern)
user
- user referencepattern
- database pattern (can be null
)public User get(String name)
name
- user namepublic String[] find(Pattern pattern)
pattern
- glob patternpublic Table info(String db)
db
- database (can be null
)public ArrayList<User> users(String db)
db
- database (can be null
)Copyright © 2005–2015 BaseX Team. All rights reserved.