use of org.pentaho.di.repository.IUser in project pentaho-kettle by pentaho.
the class UserRoleLookupCache method addUserToLookupSet.
private IUser addUserToLookupSet(ProxyPentahoUser user) {
IUser userInfo = createUserInfo(user);
userInfoSet.add(userInfo);
return userInfo;
}
use of org.pentaho.di.repository.IUser in project pentaho-kettle by pentaho.
the class UISecurityUser method getUserInfo.
public IUser getUserInfo() throws KettleException {
IUser userInfo = rsm.constructUser();
userInfo.setDescription(description);
userInfo.setLogin(name);
userInfo.setName(name);
userInfo.setUsername(name);
userInfo.setPassword(password);
return userInfo;
}
use of org.pentaho.di.repository.IUser in project pentaho-kettle by pentaho.
the class RepositoryExplorerDialog method newUser.
public void newUser() {
UserDialog ud = new UserDialog(shell, SWT.NONE, rep, new UserInfo());
IUser ui = ud.open();
if (ui != null) {
/**
*************************
* Removed by sboden as the user dialog already saves the id on pressing ok. Related defect #4228 on javaforge.
*
* // See if this user already exists... long uid = rep.getUserID(ui.getLogin()); if (uid<=0) { ui.saveRep(rep); }
* else { MessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);
* mb.setMessage(BaseMessages.getString(PKG, "RepositoryExplorerDialog.User.New.AlreadyExists.Message"));
* mb.setText(BaseMessages.getString(PKG, "RepositoryExplorerDialog.User.New.AlreadyExists.Title")); mb.open(); }
***************************
*/
// Refresh tree...
refreshTree();
}
}
use of org.pentaho.di.repository.IUser in project pentaho-kettle by pentaho.
the class RepositoryExplorerDialog method editUser.
public void editUser(String login) {
try {
// Get UserInfo from repository...
IUser uinfo = securityManager.loadUserInfo(login);
UserDialog ud = new UserDialog(shell, SWT.NONE, rep, uinfo);
IUser ui = ud.open();
if (!readonly) {
if (ui != null) {
securityManager.saveUserInfo(ui);
}
} else {
MessageBox mb = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
mb.setMessage(BaseMessages.getString(PKG, "RepositoryExplorerDialog.User.Edit.NotAllowed.Message"));
mb.setText(BaseMessages.getString(PKG, "RepositoryExplorerDialog.User.Edit.NotAllowed.Title"));
mb.open();
}
if (ui != null && !login.equalsIgnoreCase(ui.getLogin())) {
refreshTree();
}
} catch (KettleException e) {
new ErrorDialog(shell, BaseMessages.getString(PKG, "RepositoryExplorerDialog.User.Edit.UnexpectedError.Message.Title"), BaseMessages.getString(PKG, "RepositoryExplorerDialog.User.Edit.UnexpectedError.Message"), e);
}
}
Aggregations