mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-1133: Fix disabling of management menu options for users/connections/sessions.
This commit is contained in:
@@ -97,29 +97,30 @@ angular.module('userMenu').directive('guacUserMenu', [function guacUserMenu() {
|
||||
* @type Boolean
|
||||
*/
|
||||
$scope.manageUsersDisabled =
|
||||
($location.path() === '/manage/modules/user');
|
||||
($location.path() === '/manage/modules/users/');
|
||||
|
||||
/**
|
||||
* Whether the option to go to the connection management interface is
|
||||
* disabled. Note that shis is different from canManageConnections,
|
||||
* which deals with whether permission to manage is granted. A user
|
||||
* may have permission, yet see this option as currently disabled.
|
||||
* Whether the option to go to the connection management interface
|
||||
* is disabled. Note that shis is different from
|
||||
* canManageConnections, which deals with whether permission to
|
||||
* manage is granted. A user may have permission, yet see this
|
||||
* option as currently disabled.
|
||||
*
|
||||
* @type Boolean
|
||||
*/
|
||||
$scope.manageConnectionsDisabled =
|
||||
($location.path() === '/manage/modules/connections');
|
||||
($location.path() === '/manage/modules/connections/');
|
||||
|
||||
/**
|
||||
* Whether the option to go to the session management interface is
|
||||
* disabled. Note that shis is different from canManageConnections,
|
||||
* disabled. Note that shis is different from canManageSessions,
|
||||
* which deals with whether permission to manage is granted. A user
|
||||
* may have permission, yet see this option as currently disabled.
|
||||
*
|
||||
* @type Boolean
|
||||
*/
|
||||
$scope.manageSessionsDisabled =
|
||||
($location.path() === '/manage/modules/sessions');
|
||||
($location.path() === '/manage/modules/sessions/');
|
||||
|
||||
/**
|
||||
* Whether the current user has sufficient permissions to use the
|
||||
@@ -350,21 +351,21 @@ angular.module('userMenu').directive('guacUserMenu', [function guacUserMenu() {
|
||||
* Navigates to the user management interface.
|
||||
*/
|
||||
$scope.manageUsers = function manageUsers() {
|
||||
$location.path('/manage/modules/users');
|
||||
$location.path('/manage/modules/users/');
|
||||
};
|
||||
|
||||
/**
|
||||
* Navigates to the connection management interface.
|
||||
*/
|
||||
$scope.manageConnections = function manageConnections() {
|
||||
$location.path('/manage/modules/connections');
|
||||
$location.path('/manage/modules/connections/');
|
||||
};
|
||||
|
||||
/**
|
||||
* Navigates to the user session management interface.
|
||||
*/
|
||||
$scope.manageSessions = function manageSessions() {
|
||||
$location.path('/manage/modules/sessions');
|
||||
$location.path('/manage/modules/sessions/');
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -30,35 +30,43 @@
|
||||
|
||||
<!-- Home -->
|
||||
<li>
|
||||
<a class="home" ng-click="navigateHome()" ng-class="{disabled: homeDisabled}" href="#/">
|
||||
<a class="home" ng-click="navigateHome()"
|
||||
ng-class="{disabled: homeDisabled}" href="#/">
|
||||
{{'USER_MENU.ACTION_NAVIGATE_HOME' | translate}}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Manage Users -->
|
||||
<li>
|
||||
<a class="manage-users" ng-click="manageUsers()" ng-class="{disabled: manageUsersDisabled}" ng-show="canManageUsers" href="#/manage/modules/users">
|
||||
<a class="manage-users" ng-click="manageUsers()"
|
||||
ng-class="{disabled: manageUsersDisabled}"
|
||||
ng-show="canManageUsers" href="#/manage/modules/users/">
|
||||
{{'USER_MENU.ACTION_MANAGE_USERS' | translate}}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Manage Connections -->
|
||||
<li>
|
||||
<a class="manage-connections" ng-click="manageConnections()" ng-class="{disabled: manageConnectionsDisabled}" ng-show="canManageConnections" href="#/manage/modules/connections">
|
||||
<a class="manage-connections" ng-click="manageConnections()"
|
||||
ng-class="{disabled: manageConnectionsDisabled}"
|
||||
ng-show="canManageConnections" href="#/manage/modules/connections/">
|
||||
{{'USER_MENU.ACTION_MANAGE_CONNECTIONS' | translate}}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Manage Sessions -->
|
||||
<li>
|
||||
<a class="manage-sessions" ng-click="manageSessions()" ng-class="{disabled: manageSessionsDisabled}" ng-show="canManageSessions" href="#/manage/modules/sessions">
|
||||
<a class="manage-sessions" ng-click="manageSessions()"
|
||||
ng-class="{disabled: manageSessionsDisabled}"
|
||||
ng-show="canManageSessions" href="#/manage/modules/sessions/">
|
||||
{{'USER_MENU.ACTION_MANAGE_SESSIONS' | translate}}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Change password -->
|
||||
<li>
|
||||
<a class="change-password" ng-click="showPasswordUpdate()" ng-show="canChangePassword">
|
||||
<a class="change-password" ng-click="showPasswordUpdate()"
|
||||
ng-show="canChangePassword">
|
||||
{{'USER_MENU.ACTION_CHANGE_PASSWORD' | translate}}
|
||||
</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user