use of org.pentaho.di.ui.repository.repositoryexplorer.model.IUIUser in project pentaho-kettle by pentaho.
the class SecurityController method updateUser.
/**
* updateUser method is called when user has click ok on a edit user dialog. The method updates the user
*
* @throws Exception
*/
protected void updateUser() {
if (service != null) {
try {
IUIUser uiUser = security.getSelectedUser();
uiUser.setDescription(securityUser.getDescription());
uiUser.setPassword(securityUser.getPassword());
service.updateUser(uiUser.getUserInfo());
security.updateUser(uiUser);
userDialog.hide();
} catch (Throwable th) {
if (mainController == null || !mainController.handleLostRepository(th)) {
messageBox.setTitle(BaseMessages.getString(PKG, "Dialog.Error"));
messageBox.setAcceptLabel(BaseMessages.getString(PKG, "Dialog.Ok"));
messageBox.setMessage(BaseMessages.getString(PKG, "UpdateUser.UnableToUpdateUser", th.getLocalizedMessage()));
messageBox.open();
}
}
}
}
Aggregations