public class DelegatingUserContext extends Object implements UserContext
| Constructor and Description |
|---|
DelegatingUserContext(UserContext userContext)
Wraps the given UserContext such that all function calls against this
DelegatingUserContext will be delegated to it.
|
| Modifier and Type | Method and Description |
|---|---|
Directory<ActiveConnection> |
getActiveConnectionDirectory()
Retrieves a Directory which can be used to view and manipulate
active connections, but only as allowed by the permissions given to the
user.
|
AuthenticationProvider |
getAuthenticationProvider()
Returns the AuthenticationProvider which created this UserContext, which
may not be the same AuthenticationProvider that authenticated the user
associated with this UserContext.
|
Collection<Form> |
getConnectionAttributes()
Retrieves a collection of all attributes applicable to connections.
|
Directory<Connection> |
getConnectionDirectory()
Retrieves a Directory which can be used to view and manipulate
connections and their configurations, but only as allowed by the
permissions given to the user.
|
Collection<Form> |
getConnectionGroupAttributes()
Retrieves a collection of all attributes applicable to connection
groups.
|
Directory<ConnectionGroup> |
getConnectionGroupDirectory()
Retrieves a Directory which can be used to view and manipulate
connection groups and their members, but only as allowed by the
permissions given to the user.
|
ActivityRecordSet<ConnectionRecord> |
getConnectionHistory()
Retrieves all connection records visible to current user.
|
protected UserContext |
getDelegateUserContext()
Returns the underlying UserContext wrapped by this
DelegatingUserContext.
|
UserContext |
getPrivileged()
Returns a user context which provides privileged access.
|
Object |
getResource()
Returns an arbitrary REST resource representing this UserContext.
|
ConnectionGroup |
getRootConnectionGroup()
Retrieves a connection group which can be used to view and manipulate
connections, but only as allowed by the permissions given to the user of
this UserContext.
|
Collection<Form> |
getSharingProfileAttributes()
Retrieves a collection of all attributes applicable to sharing profiles.
|
Directory<SharingProfile> |
getSharingProfileDirectory()
Retrieves a Directory which can be used to view and manipulate
sharing profiles and their configurations, but only as allowed by the
permissions given to the user.
|
Collection<Form> |
getUserAttributes()
Retrieves a collection of all attributes applicable to users.
|
Directory<User> |
getUserDirectory()
Retrieves a Directory which can be used to view and manipulate other
users, but only as allowed by the permissions given to the user of this
UserContext.
|
Collection<Form> |
getUserGroupAttributes()
Retrieves a collection of all attributes applicable to user groups.
|
Directory<UserGroup> |
getUserGroupDirectory()
Retrieves a Directory which can be used to view and manipulate user
groups, but only as allowed by the permissions given to the user of this
UserContext.
|
ActivityRecordSet<ActivityRecord> |
getUserHistory()
Retrieves all user history records visible to current user.
|
void |
invalidate()
Invalidates this user context, releasing all associated resources.
|
User |
self()
Returns the User whose access rights control the operations of this
UserContext.
|
public DelegatingUserContext(UserContext userContext)
userContext - The UserContext to wrap.protected UserContext getDelegateUserContext()
public User self()
UserContextself in interface UserContextpublic Object getResource() throws org.apache.guacamole.GuacamoleException
UserContextgetResource in interface UserContextorg.apache.guacamole.GuacamoleException - If the REST resource cannot be returned due to an error.public AuthenticationProvider getAuthenticationProvider()
UserContextgetAuthenticationProvider in interface UserContextpublic Directory<User> getUserDirectory() throws org.apache.guacamole.GuacamoleException
UserContextgetUserDirectory in interface UserContextorg.apache.guacamole.GuacamoleException - If an error occurs while creating the
Directory.public Directory<UserGroup> getUserGroupDirectory() throws org.apache.guacamole.GuacamoleException
UserContextgetUserGroupDirectory in interface UserContextorg.apache.guacamole.GuacamoleException - If an error occurs while creating the Directory.public Directory<Connection> getConnectionDirectory() throws org.apache.guacamole.GuacamoleException
UserContextgetConnectionDirectory in interface UserContextorg.apache.guacamole.GuacamoleException - If an error occurs while creating the
Directory.public Directory<ConnectionGroup> getConnectionGroupDirectory() throws org.apache.guacamole.GuacamoleException
UserContextgetConnectionGroupDirectory in interface UserContextorg.apache.guacamole.GuacamoleException - If an error occurs while creating the
Directory.public Directory<ActiveConnection> getActiveConnectionDirectory() throws org.apache.guacamole.GuacamoleException
UserContextgetActiveConnectionDirectory in interface UserContextorg.apache.guacamole.GuacamoleException - If an error occurs while creating the Directory.public Directory<SharingProfile> getSharingProfileDirectory() throws org.apache.guacamole.GuacamoleException
UserContextgetSharingProfileDirectory in interface UserContextorg.apache.guacamole.GuacamoleException - If an error occurs while creating the Directory.public ActivityRecordSet<ConnectionRecord> getConnectionHistory() throws org.apache.guacamole.GuacamoleException
UserContextgetConnectionHistory in interface UserContextorg.apache.guacamole.GuacamoleException - If an error occurs while retrieving the connection records.public ActivityRecordSet<ActivityRecord> getUserHistory() throws org.apache.guacamole.GuacamoleException
UserContextgetUserHistory in interface UserContextorg.apache.guacamole.GuacamoleException - If an error occurs while retrieving the user records.public ConnectionGroup getRootConnectionGroup() throws org.apache.guacamole.GuacamoleException
UserContextgetRootConnectionGroup in interface UserContextorg.apache.guacamole.GuacamoleException - If an error occurs while creating the
Directory.public Collection<Form> getUserAttributes()
UserContextgetUserAttributes in interface UserContextpublic Collection<Form> getUserGroupAttributes()
UserContextgetUserGroupAttributes in interface UserContextpublic Collection<Form> getConnectionAttributes()
UserContextgetConnectionAttributes in interface UserContextpublic Collection<Form> getConnectionGroupAttributes()
UserContextgetConnectionGroupAttributes in interface UserContextpublic Collection<Form> getSharingProfileAttributes()
UserContextgetSharingProfileAttributes in interface UserContextpublic void invalidate()
UserContextinvalidate in interface UserContextpublic UserContext getPrivileged()
UserContextThis function is intended to allow extensions which decorate other extensions to act independently of the restrictions that affect the current user. This function will only be invoked by extensions and WILL NOT be invoked directly by the web application. Implementations of this function MAY still enforce access restrictions, particularly if they do not want to grant full, unrestricted access to other extensions.
A default implementation which simply returns this is
provided for compatibility with Apache Guacamole 1.1.0 and older.
getPrivileged in interface UserContextCopyright © 2020. All rights reserved.