Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #2590 - Deleted users makes it impossible to download CSV cont… #2593

Merged

Conversation

lbownik
Copy link
Contributor

@lbownik lbownik commented Nov 22, 2024

…aining users' list

@lbownik lbownik requested a review from diasf November 22, 2024 15:19
@lbownik lbownik force-pushed the 2590_deleted_user_makes_it_impossible_to_download_CSV branch from 2ed2460 to 8fba0a3 Compare November 22, 2024 18:02
@@ -27,8 +27,13 @@ public class DashboardUserInfoService {
public List<DashboardUserInfo> createDashboardUsers(UserListResult userListResult) {
List<DashboardUserInfo> userInfoList = new LinkedList<>();
for (AuthenticatedUser user : userListResult.getUserList()) {
userInfoList.add(new DashboardUserInfo(user, getAuthProviderFriendlyName(user),
hasSelectedConfirmedEmail(user), getUserNotificationLanguageDisplayName(user, session.getLocale())));
if (!user.isErased()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is the best place to filter. What about counters, are they still correct? I would have guessed that UserServiceBean or queries in AuthenticatedUser would be a better place to filter out erased accounts in order have a more consistent impact.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -40,7 +40,9 @@ public void write(OutputStream outputStream, List<AuthenticatedUser> authenticat

csvPrinter.printRecord(AuthenticatedUserCSVRecord.getHeaders());
for(AuthenticatedUser user : authenticatedUsers) {
csvPrinter.printRecord(buildRecord(user).getValues());
if(! user.isErased()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, this seems to be the wrong place to filter out records.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@lbownik lbownik requested a review from diasf November 26, 2024 15:05
Copy link
Contributor

@diasf diasf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@diasf diasf assigned lbownik and unassigned diasf Nov 27, 2024
@lbownik lbownik force-pushed the 2590_deleted_user_makes_it_impossible_to_download_CSV branch from e4d33aa to 922bacd Compare November 27, 2024 08:55
@lbownik lbownik merged commit a4ef3b6 into develop Nov 27, 2024
1 check passed
@lbownik lbownik deleted the 2590_deleted_user_makes_it_impossible_to_download_CSV branch November 27, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants