mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-1812: Merge always show the UI to edit own password for administrators.
This commit is contained in:
@@ -174,10 +174,17 @@ angular.module('settings').directive('guacSettingsPreferences', [function guacSe
|
|||||||
permissionService.getEffectivePermissions(dataSource, username)
|
permissionService.getEffectivePermissions(dataSource, username)
|
||||||
.then(function permissionsRetrieved(permissions) {
|
.then(function permissionsRetrieved(permissions) {
|
||||||
|
|
||||||
// Add action for changing password if permission is granted
|
// Add action for updating password
|
||||||
$scope.canChangePassword = PermissionSet.hasUserPermission(permissions,
|
$scope.canChangePassword = (
|
||||||
PermissionSet.ObjectPermissionType.UPDATE, username);
|
|
||||||
|
// If permission is explicitly granted
|
||||||
|
PermissionSet.hasUserPermission(permissions,
|
||||||
|
PermissionSet.ObjectPermissionType.UPDATE, username)
|
||||||
|
|
||||||
|
// Or if implicitly granted through being an administrator
|
||||||
|
|| PermissionSet.hasSystemPermission(permissions,
|
||||||
|
PermissionSet.SystemPermissionType.ADMINISTER));
|
||||||
|
|
||||||
})
|
})
|
||||||
['catch'](requestService.createErrorCallback(function permissionsFailed(error) {
|
['catch'](requestService.createErrorCallback(function permissionsFailed(error) {
|
||||||
$scope.canChangePassword = false;
|
$scope.canChangePassword = false;
|
||||||
|
Reference in New Issue
Block a user