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,Identifiable,Permissions,ReadableAttributes,User
public class SimpleUser extends AbstractUser
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
Constructors Constructor Description SimpleUser()Creates 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectPermissionSetgetConnectionGroupPermissions()Returns all connection group permissions given to this object.ObjectPermissionSetgetConnectionPermissions()Returns all connection permissions given to this object.ObjectPermissionSetgetUserPermissions()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.Identifiable
getIdentifier, setIdentifier
-
Methods inherited from interface org.apache.guacamole.net.auth.User
getHistory, getUserHistory
-
-
-
-
Constructor Detail
-
SimpleUser
public SimpleUser()
Creates a completely uninitialized SimpleUser.
-
SimpleUser
public SimpleUser(String username)
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 Detail
-
getConnectionPermissions
public ObjectPermissionSet getConnectionPermissions() throws org.apache.guacamole.GuacamoleException
Description 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.GuacamoleException
Description 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
public ObjectPermissionSet getUserPermissions() throws org.apache.guacamole.GuacamoleException
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.
-
-