mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-1656: Ensure the preferences page refreshes on save in case a one-time-token was updated.
This commit is contained in:
@@ -58,6 +58,20 @@ angular.module('settings').directive('guacSettingsPreferences', [function guacSe
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An action which closes the current dialog, and refreshes
|
||||||
|
* the user data on dialog close.
|
||||||
|
*/
|
||||||
|
const ACKNOWLEDGE_ACTION_RELOAD = {
|
||||||
|
name : 'SETTINGS_PREFERENCES.ACTION_ACKNOWLEDGE',
|
||||||
|
// Handle action
|
||||||
|
callback : function acknowledgeCallback() {
|
||||||
|
userService.getUser(dataSource, username)
|
||||||
|
.then(user => $scope.user = user)
|
||||||
|
.then(guacNotification.showStatus(false))
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The user being modified.
|
* The user being modified.
|
||||||
*
|
*
|
||||||
@@ -237,7 +251,9 @@ angular.module('settings').directive('guacSettingsPreferences', [function guacSe
|
|||||||
text : {
|
text : {
|
||||||
key : 'SETTINGS_PREFERENCES.INFO_PREFERENCE_ATTRIBUTES_CHANGED'
|
key : 'SETTINGS_PREFERENCES.INFO_PREFERENCE_ATTRIBUTES_CHANGED'
|
||||||
},
|
},
|
||||||
actions : [ ACKNOWLEDGE_ACTION ]
|
|
||||||
|
// Reload the user on successful save in case any attributes changed
|
||||||
|
actions : [ ACKNOWLEDGE_ACTION_RELOAD ]
|
||||||
}),
|
}),
|
||||||
guacNotification.SHOW_REQUEST_ERROR);
|
guacNotification.SHOW_REQUEST_ERROR);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user