public UserView findUserForEdit(String username) throws AuthorizationDeniedException {
UserView userview = null;
UserDataVO user = userAdminSession.findUser(administrator, username);
if (this.informationmemory.getGlobalConfiguration().getEnableEndEntityProfileLimitations()) {
if (!endEntityAuthorization(administrator, user.getEndEntityProfileId(),AccessRulesConstants.EDIT_RIGHTS, false)) {
throw new AuthorizationDeniedException("Not authorized to edit user.");
}
}
if (user != null) {
userview = new UserView(user, informationmemory.getCAIdToNameMap());
}