Search in sources :

Example 16 with IUIUser

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();
            }
        }
    }
}
Also used : IUIUser(org.pentaho.di.ui.repository.repositoryexplorer.model.IUIUser)

Aggregations

IUIUser (org.pentaho.di.ui.repository.repositoryexplorer.model.IUIUser)16 IUIRole (org.pentaho.di.ui.repository.pur.repositoryexplorer.IUIRole)6 HashSet (java.util.HashSet)4 Test (org.junit.Test)4 UIRepositoryRole (org.pentaho.di.ui.repository.pur.repositoryexplorer.model.UIRepositoryRole)4 UIRepositoryUser (org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryUser)4 ArrayList (java.util.ArrayList)3 IUIEEUser (org.pentaho.di.ui.repository.pur.repositoryexplorer.IUIEEUser)3 UIEERepositoryUser (org.pentaho.di.ui.repository.pur.repositoryexplorer.model.UIEERepositoryUser)3 KettleException (org.pentaho.di.core.exception.KettleException)2 IUser (org.pentaho.di.repository.IUser)2 UserInfo (org.pentaho.di.repository.UserInfo)2 EEUserInfo (org.pentaho.di.repository.pur.model.EEUserInfo)2 IRole (org.pentaho.di.repository.pur.model.IRole)2 UISecurityRole (org.pentaho.di.ui.repository.pur.repositoryexplorer.model.UISecurityRole)2 List (java.util.List)1 Before (org.junit.Before)1 Type (org.pentaho.di.repository.ObjectRecipient.Type)1 EERoleInfo (org.pentaho.di.repository.pur.model.EERoleInfo)1 IRoleSupportSecurityManager (org.pentaho.di.ui.repository.pur.services.IRoleSupportSecurityManager)1