@ GET @ Path ( "parameters" ) public Map < String , String > getConnectionParameters ( ) throws GuacamoleException { // Pull effective permissions Permissions effective = userContext . self ( ) . getEffectivePermissions ( ) ; // Retrieve permission sets SystemPermissionSet systemPermissions = effective . getSystemPermissions ( ) ; ObjectPermissionSet connectionPermissions = effective . getConnectionPermissions ( ) ; // Deny access if adminstrative or update permission is missing String identifier = connection . getIdentifier ( ) ; if ( ! systemPermissions . hasPermission ( SystemPermission . Type . ADMINISTER ) && ! connectionPermissions . hasPermission ( ObjectPermission . Type . UPDATE , identifier ) ) throw new GuacamoleSecurityException ( "Permission to read connection parameters denied." ) ; // Retrieve connection configuration GuacamoleConfiguration config = connection . getConfiguration ( ) ; // Return parameter map return config . getParameters ( ) ; }
Retrieves the parameters associated with a single connection .