use of org.pentaho.di.repository.pur.model.IEEUser in project pentaho-kettle by pentaho.
the class UserRoleHelper method convertFromProxyPentahoUser.
public static IUser convertFromProxyPentahoUser(IUserRoleWebService userRoleWebService, ProxyPentahoUser user, UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm) {
IUser userInfo = null;
try {
userInfo = rsm.constructUser();
userInfo.setDescription(user.getDescription());
userInfo.setPassword(user.getPassword());
userInfo.setLogin(user.getName());
userInfo.setName(user.getName());
try {
if (userInfo instanceof IEEUser) {
((IEEUser) userInfo).setRoles(convertToSetFromProxyPentahoRoles(userRoleWebService.getRolesForUser(user), lookupCache));
}
} catch (UserRoleException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (KettleException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
return userInfo;
}
use of org.pentaho.di.repository.pur.model.IEEUser in project pentaho-kettle by pentaho.
the class UserRoleLookupCache method updateUserInLookupSet.
public void updateUserInLookupSet(IUser user) {
IUser userInfoToUpdate = null;
for (IUser userInfo : userInfoSet) {
if (userInfo.getLogin().equals(user.getLogin())) {
userInfoToUpdate = userInfo;
break;
}
}
userInfoToUpdate.setDescription(user.getDescription());
if (!StringUtils.isEmpty(user.getPassword())) {
userInfoToUpdate.setPassword(user.getPassword());
}
if (user instanceof IEEUser) {
((IEEUser) userInfoToUpdate).setRoles(((IEEUser) user).getRoles());
}
}
Aggregations