Class SimpleUser
java.lang.Object
org.apache.guacamole.net.auth.AbstractIdentifiable
org.apache.guacamole.net.auth.AbstractUser
org.apache.guacamole.net.auth.simple.SimpleUser
- All Implemented Interfaces:
Attributes
,Disableable
,Identifiable
,Permissions
,ReadableAttributes
,User
A read-only User implementation which has no permissions. Implementations
that need to define permissions should extend this class and override the
associated getters.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.guacamole.net.auth.User
User.Attribute
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a completely uninitialized SimpleUser.SimpleUser
(String username) Creates a new SimpleUser having the given username.SimpleUser
(String username, Collection<String> connectionIdentifiers, Collection<String> connectionGroupIdentifiers) Deprecated.Extend and override the applicable permission set getters instead, relying on SimpleUser to expose no permissions by default for all permission sets that aren't overridden.SimpleUser
(String username, Collection<String> userIdentifiers, Collection<String> connectionIdentifiers, Collection<String> connectionGroupIdentifiers) Deprecated.Extend and override the applicable permission set getters instead, relying on SimpleUser to expose no permissions by default for all permission sets that aren't overridden. -
Method Summary
Modifier and TypeMethodDescriptionReturns all connection group permissions given to this object.Returns all connection permissions given to this object.Returns all user permissions given to this object.Methods inherited from class org.apache.guacamole.net.auth.AbstractUser
getActiveConnectionPermissions, getAttributes, getEffectivePermissions, getLastActive, getPassword, getSharingProfilePermissions, getSystemPermissions, getUserGroupPermissions, getUserGroups, setAttributes, setPassword
Methods inherited from class org.apache.guacamole.net.auth.AbstractIdentifiable
equals, getIdentifier, hashCode, setIdentifier
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.guacamole.net.auth.Disableable
isDisabled, setDisabled
Methods inherited from interface org.apache.guacamole.net.auth.Identifiable
getIdentifier, setIdentifier
Methods inherited from interface org.apache.guacamole.net.auth.User
getHistory, getUserHistory
-
Constructor Details
-
SimpleUser
public SimpleUser()Creates a completely uninitialized SimpleUser. -
SimpleUser
Creates a new SimpleUser having the given username.- Parameters:
username
- The username to assign to this SimpleUser.
-
SimpleUser
@Deprecated public SimpleUser(String username, Collection<String> connectionIdentifiers, Collection<String> connectionGroupIdentifiers) Deprecated.Extend and override the applicable permission set getters instead, relying on SimpleUser to expose no permissions by default for all permission sets that aren't overridden. SeeSimpleObjectPermissionSet
for convenient methods of providing a read-only permission set with specific permissions.Creates a new SimpleUser having the given username and READ access to the connections and connection groups having the given identifiers.- Parameters:
username
- The username to assign to this SimpleUser.connectionIdentifiers
- The identifiers of all connections this user has READ access to.connectionGroupIdentifiers
- The identifiers of all connection groups this user has READ access to.
-
SimpleUser
@Deprecated public SimpleUser(String username, Collection<String> userIdentifiers, Collection<String> connectionIdentifiers, Collection<String> connectionGroupIdentifiers) Deprecated.Extend and override the applicable permission set getters instead, relying on SimpleUser to expose no permissions by default for all permission sets that aren't overridden. SeeSimpleObjectPermissionSet
for convenient methods of providing a read-only permission set with specific permissions.Creates a new SimpleUser having the given username and READ access to the users, connections, and groups having the given identifiers.- Parameters:
username
- The username to assign to this SimpleUser.userIdentifiers
- The identifiers of all users this user has READ access to.connectionIdentifiers
- The identifiers of all connections this user has READ access to.connectionGroupIdentifiers
- The identifiers of all connection groups this user has READ access to.
-
-
Method Details
-
getConnectionPermissions
public ObjectPermissionSet getConnectionPermissions() throws org.apache.guacamole.GuacamoleExceptionDescription copied from class:AbstractUser
Returns all connection permissions given to this object.This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.
- Specified by:
getConnectionPermissions
in interfacePermissions
- Overrides:
getConnectionPermissions
in classAbstractUser
- Returns:
- An ObjectPermissionSet of all connection permissions granted to this object.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving permissions, or if reading all permissions is not allowed.
-
getConnectionGroupPermissions
public ObjectPermissionSet getConnectionGroupPermissions() throws org.apache.guacamole.GuacamoleExceptionDescription copied from class:AbstractUser
Returns all connection group permissions given to this object.This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.
- Specified by:
getConnectionGroupPermissions
in interfacePermissions
- Overrides:
getConnectionGroupPermissions
in classAbstractUser
- Returns:
- An ObjectPermissionSet of all connection group permissions granted to this object.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving permissions, or if reading all permissions is not allowed.
-
getUserPermissions
Description copied from class:AbstractUser
Returns all user permissions given to this object.This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.
- Specified by:
getUserPermissions
in interfacePermissions
- Overrides:
getUserPermissions
in classAbstractUser
- Returns:
- An ObjectPermissionSet of all user permissions granted to this object.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving permissions, or if reading all permissions is not allowed.
-