Package org.basex.core.users
Class Users
java.lang.Object
org.basex.core.users.Users
This class organizes all users.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a user.voidRenames a user.booleanDrops a user from the list.String[]Returns all user names that match the specified pattern.Returns user with the specified name.info()Returns the info element.Returns table with all users, or users from a specific database.voidSets the info element.Returns all users, or users that have permissions for a specific database.voidwrite()Writes permissions to disk.
-
Constructor Details
-
Users
Constructor for global users.- Parameters:
sopts- static options
-
-
Method Details
-
write
public void write()Writes permissions to disk. -
add
Adds a user.- Parameters:
user- user to be added
-
alter
Renames a user.- Parameters:
user- user referencename- new name
-
drop
Drops a user from the list.- Parameters:
user- user reference- Returns:
- success flag
-
get
Returns user with the specified name.- Parameters:
name- user name- Returns:
- user name or
null
-
find
Returns all user names that match the specified pattern.- Parameters:
pattern- glob pattern- Returns:
- user list
-
info
Returns table with all users, or users from a specific database. The list will only contain the current user if no admin permissions are available.- Parameters:
db- database (can benull)ctx- database context- Returns:
- user information
-
users
Returns all users, or users that have permissions for a specific database. The list will only contain the current user if no admin permissions are available.- Parameters:
db- database (can benull)ctx- database context- Returns:
- user information
-
info
Returns the info element.- Returns:
- info element (can be
null)
-
info
Sets the info element.- Parameters:
elem- info element
-