public class SimpleUser extends AbstractUser
Constructor and Description |
---|
SimpleUser()
Creates a completely uninitialized SimpleUser.
|
SimpleUser(String username,
Map<String,GuacamoleConfiguration> configs,
Collection<ConnectionGroup> groups)
Creates a new SimpleUser having the given username.
|
Modifier and Type | Method and Description |
---|---|
void |
addPermission(Permission permission)
Adds the specified permission to this user.
|
Set<Permission> |
getPermissions()
Lists all permissions given to this user.
|
boolean |
hasPermission(Permission permission)
Tests whether this user has the specified permission.
|
void |
removePermission(Permission permission)
Removes the specified permission from this specified user.
|
equals, getPassword, getUsername, hashCode, setPassword, setUsername
public SimpleUser()
public SimpleUser(String username, Map<String,GuacamoleConfiguration> configs, Collection<ConnectionGroup> groups)
username
- The username to assign to this SimpleUser.configs
- All configurations this user has read access to.groups
- All groups this user has read access to.public Set<Permission> getPermissions() throws GuacamoleException
User
GuacamoleException
- If an error occurs while retrieving
permissions, or if reading all permissions
is not allowed.public boolean hasPermission(Permission permission) throws GuacamoleException
User
permission
- The permission to check.GuacamoleException
- If an error occurs while checking permissions,
or if permissions cannot be checked due to
lack of permissions to do so.public void addPermission(Permission permission) throws GuacamoleException
User
permission
- The permission to add.GuacamoleException
- If an error occurs while adding the
permission. or if permission to add
permissions is denied.public void removePermission(Permission permission) throws GuacamoleException
User
permission
- The permission to remove.GuacamoleException
- If an error occurs while removing the
permission. or if permission to remove
permissions is denied.Copyright © 2014. All rights reserved.