mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUACAMOLE-1812: Merge always show the UI to edit own password for administrators.
This commit is contained in:
		| @@ -174,9 +174,16 @@ angular.module('settings').directive('guacSettingsPreferences', [function guacSe | ||||
|             permissionService.getEffectivePermissions(dataSource, username) | ||||
|             .then(function permissionsRetrieved(permissions) { | ||||
|  | ||||
|                 // Add action for changing password if permission is granted | ||||
|                 $scope.canChangePassword = PermissionSet.hasUserPermission(permissions, | ||||
|                         PermissionSet.ObjectPermissionType.UPDATE, username); | ||||
|                 // Add action for updating password | ||||
|                 $scope.canChangePassword = ( | ||||
|  | ||||
|                         // 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) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user