mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-09 22:51:22 +00:00
GUAC-1126 Created user page service which provides the list of main pages for a user.
This commit is contained in:
committed by
Michael Jumper
parent
1d0b32388b
commit
7bf4cb83d8
@@ -30,9 +30,11 @@ angular.module('home').controller('homeController', ['$scope', '$injector',
|
||||
var ConnectionGroup = $injector.get("ConnectionGroup");
|
||||
|
||||
// Get required services
|
||||
var $location = $injector.get("$location");
|
||||
var authenticationService = $injector.get("authenticationService");
|
||||
var connectionGroupService = $injector.get("connectionGroupService");
|
||||
var permissionService = $injector.get("permissionService");
|
||||
var userPageService = $injector.get("userPageService");
|
||||
|
||||
/**
|
||||
* The root connection group, or null if the connection group hierarchy has
|
||||
@@ -67,7 +69,13 @@ angular.module('home').controller('homeController', ['$scope', '$injector',
|
||||
// Retrieve root group and all descendants
|
||||
connectionGroupService.getConnectionGroupTree(ConnectionGroup.ROOT_IDENTIFIER)
|
||||
.success(function rootGroupRetrieved(rootConnectionGroup) {
|
||||
|
||||
$scope.rootConnectionGroup = rootConnectionGroup;
|
||||
|
||||
// Navigate to home page, if not already there
|
||||
var homePage = userPageService.getHomePage(rootConnectionGroup);
|
||||
$location.url(homePage.url);
|
||||
|
||||
});
|
||||
|
||||
// Retrieve current permissions
|
||||
|
@@ -20,4 +20,4 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
angular.module('home', ['client', 'history', 'groupList', 'rest', 'userMenu']);
|
||||
angular.module('home', ['client', 'groupList', 'history', 'navigation', 'rest']);
|
||||
|
@@ -27,7 +27,7 @@
|
||||
<!-- The recent connections for this user -->
|
||||
<div class="header">
|
||||
<h2>{{'HOME.SECTION_HEADER_RECENT_CONNECTIONS' | translate}}</h2>
|
||||
<guac-user-menu permissions="permissions"></guac-user-menu>
|
||||
<guac-user-menu permissions="permissions" root-group="rootConnectionGroup"></guac-user-menu>
|
||||
</div>
|
||||
<div class="recent-connections">
|
||||
<guac-recent-connections root-group="rootConnectionGroup"></guac-recent-connections>
|
||||
|
Reference in New Issue
Block a user