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, setPasswordMethods inherited from class org.apache.guacamole.net.auth.AbstractIdentifiable
equals, getIdentifier, hashCode, setIdentifierMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.guacamole.net.auth.Disableable
isDisabled, setDisabledMethods inherited from interface org.apache.guacamole.net.auth.Identifiable
getIdentifier, setIdentifierMethods 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. SeeSimpleObjectPermissionSetfor 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. SeeSimpleObjectPermissionSetfor 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:AbstractUserReturns 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:
getConnectionPermissionsin interfacePermissions- Overrides:
getConnectionPermissionsin 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:AbstractUserReturns 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:
getConnectionGroupPermissionsin interfacePermissions- Overrides:
getConnectionGroupPermissionsin 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:AbstractUserReturns 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:
getUserPermissionsin interfacePermissions- Overrides:
getUserPermissionsin 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.
-