mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 14:11:21 +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
|
* @type Boolean
|
||||||
*/
|
*/
|
||||||
$scope.manageUsersDisabled =
|
$scope.manageUsersDisabled =
|
||||||
($location.path() === '/manage/modules/user');
|
($location.path() === '/manage/modules/users/');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the option to go to the connection management interface is
|
* Whether the option to go to the connection management interface
|
||||||
* disabled. Note that shis is different from canManageConnections,
|
* is disabled. Note that shis is different from
|
||||||
* which deals with whether permission to manage is granted. A user
|
* canManageConnections, which deals with whether permission to
|
||||||
* may have permission, yet see this option as currently disabled.
|
* manage is granted. A user may have permission, yet see this
|
||||||
|
* option as currently disabled.
|
||||||
*
|
*
|
||||||
* @type Boolean
|
* @type Boolean
|
||||||
*/
|
*/
|
||||||
$scope.manageConnectionsDisabled =
|
$scope.manageConnectionsDisabled =
|
||||||
($location.path() === '/manage/modules/connections');
|
($location.path() === '/manage/modules/connections/');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the option to go to the session management interface is
|
* 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
|
* which deals with whether permission to manage is granted. A user
|
||||||
* may have permission, yet see this option as currently disabled.
|
* may have permission, yet see this option as currently disabled.
|
||||||
*
|
*
|
||||||
* @type Boolean
|
* @type Boolean
|
||||||
*/
|
*/
|
||||||
$scope.manageSessionsDisabled =
|
$scope.manageSessionsDisabled =
|
||||||
($location.path() === '/manage/modules/sessions');
|
($location.path() === '/manage/modules/sessions/');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the current user has sufficient permissions to use the
|
* 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.
|
* Navigates to the user management interface.
|
||||||
*/
|
*/
|
||||||
$scope.manageUsers = function manageUsers() {
|
$scope.manageUsers = function manageUsers() {
|
||||||
$location.path('/manage/modules/users');
|
$location.path('/manage/modules/users/');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Navigates to the connection management interface.
|
* Navigates to the connection management interface.
|
||||||
*/
|
*/
|
||||||
$scope.manageConnections = function manageConnections() {
|
$scope.manageConnections = function manageConnections() {
|
||||||
$location.path('/manage/modules/connections');
|
$location.path('/manage/modules/connections/');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Navigates to the user session management interface.
|
* Navigates to the user session management interface.
|
||||||
*/
|
*/
|
||||||
$scope.manageSessions = function manageSessions() {
|
$scope.manageSessions = function manageSessions() {
|
||||||
$location.path('/manage/modules/sessions');
|
$location.path('/manage/modules/sessions/');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -30,35 +30,43 @@
|
|||||||
|
|
||||||
<!-- Home -->
|
<!-- Home -->
|
||||||
<li>
|
<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}}
|
{{'USER_MENU.ACTION_NAVIGATE_HOME' | translate}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- Manage Users -->
|
<!-- Manage Users -->
|
||||||
<li>
|
<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}}
|
{{'USER_MENU.ACTION_MANAGE_USERS' | translate}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- Manage Connections -->
|
<!-- Manage Connections -->
|
||||||
<li>
|
<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}}
|
{{'USER_MENU.ACTION_MANAGE_CONNECTIONS' | translate}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- Manage Sessions -->
|
<!-- Manage Sessions -->
|
||||||
<li>
|
<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}}
|
{{'USER_MENU.ACTION_MANAGE_SESSIONS' | translate}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- Change password -->
|
<!-- Change password -->
|
||||||
<li>
|
<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}}
|
{{'USER_MENU.ACTION_CHANGE_PASSWORD' | translate}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
Reference in New Issue
Block a user