GUACAMOLE-5: Provide direct access via REST to the sharing profiles available for the active connection of a given tunnel.
This commit is contained in:
1 parent
bb36045ff8
commit
7ea4af7016
3 files changed
+158
No files matched your search
@@ -68,6 +68,36 @@ angular.module('rest').factory('tunnelService', ['$injector',
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the set of sharing profiles that the current user can use to
|
||||
* share the active connection of the given tunnel.
|
||||
*
|
||||
* @param {String} tunnel
|
||||
* The UUID of the tunnel associated with the Guacamole connection
|
||||
* whose sharing profiles are being retrieved.
|
||||
*
|
||||
* @returns {Promise.<Object.<String, SharingProfile>>}
|
||||
* A promise which will resolve with a map of @link{SharingProfile}
|
||||
* objects where each key is the identifier of the corresponding
|
||||
* sharing profile.
|
||||
*/
|
||||
service.getSharingProfiles = function getSharingProfiles(tunnel) {
|
||||
|
||||
// Build HTTP parameters set
|
||||
var httpParameters = {
|
||||
token : authenticationService.getCurrentToken()
|
||||
};
|
||||
|
||||
// Retrieve all associated sharing profiles
|
||||
return $http({
|
||||
method : 'GET',
|
||||
url : 'api/session/tunnels/' + encodeURIComponent(tunnel)
|
||||
+ '/activeConnection/connection/sharingProfiles',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Makes a request to the REST API to generate credentials which have
|
||||
* access strictly to the active connection associated with the given
|
||||
|
||||
Reference in new issue
Block a user