mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-586: Migrate user management UI to data source version of guacGroupList.
This commit is contained in:
@@ -113,12 +113,13 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
|||||||
$scope.permissionFlags = null;
|
$scope.permissionFlags = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The root connection group of the connection group hierarchy within the
|
* A map of data source identifiers to the root connection groups within
|
||||||
* data source containing the user being edited/created.
|
* thost data sources. As only one data source is applicable to any one
|
||||||
|
* user being edited/created, this will only contain a single key.
|
||||||
*
|
*
|
||||||
* @type ConnectionGroup
|
* @type Object.<String, ConnectionGroup>
|
||||||
*/
|
*/
|
||||||
$scope.rootGroup = null;
|
$scope.rootGroups = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All permissions associated with the current user, or null if the user's
|
* All permissions associated with the current user, or null if the user's
|
||||||
@@ -167,7 +168,7 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
|||||||
|
|
||||||
return $scope.user !== null
|
return $scope.user !== null
|
||||||
&& $scope.permissionFlags !== null
|
&& $scope.permissionFlags !== null
|
||||||
&& $scope.rootGroup !== null
|
&& $scope.rootGroups !== null
|
||||||
&& $scope.permissions !== null
|
&& $scope.permissions !== null
|
||||||
&& $scope.attributes !== null;
|
&& $scope.attributes !== null;
|
||||||
|
|
||||||
@@ -373,9 +374,14 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Retrieve all connections for which we have ADMINISTER permission
|
// Retrieve all connections for which we have ADMINISTER permission
|
||||||
connectionGroupService.getConnectionGroupTree(dataSource, ConnectionGroup.ROOT_IDENTIFIER, [PermissionSet.ObjectPermissionType.ADMINISTER])
|
dataSourceService.apply(
|
||||||
.success(function connectionGroupReceived(rootGroup) {
|
connectionGroupService.getConnectionGroupTree,
|
||||||
$scope.rootGroup = rootGroup;
|
[dataSource],
|
||||||
|
ConnectionGroup.ROOT_IDENTIFIER,
|
||||||
|
[PermissionSet.ObjectPermissionType.ADMINISTER]
|
||||||
|
)
|
||||||
|
.then(function connectionGroupReceived(rootGroups) {
|
||||||
|
$scope.rootGroups = rootGroups;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Query the user's permissions for the current user
|
// Query the user's permissions for the current user
|
||||||
|
@@ -84,7 +84,7 @@ THE SOFTWARE.
|
|||||||
<div class="section">
|
<div class="section">
|
||||||
<guac-group-list
|
<guac-group-list
|
||||||
context="groupListContext"
|
context="groupListContext"
|
||||||
connection-group="rootGroup"
|
connection-groups="rootGroups"
|
||||||
connection-template="'app/manage/templates/connectionPermission.html'"
|
connection-template="'app/manage/templates/connectionPermission.html'"
|
||||||
connection-group-template="'app/manage/templates/connectionGroupPermission.html'"
|
connection-group-template="'app/manage/templates/connectionGroupPermission.html'"
|
||||||
page-size="20"/>
|
page-size="20"/>
|
||||||
|
Reference in New Issue
Block a user