Skip to content

Conversation

diya17
Copy link
Contributor

@diya17 diya17 commented Mar 13, 2024

Guidelines for Pull Requests

If you haven't yet read our code review guidelines, please do so, You can find them here.

Please confirm the following by adding an x for each item (turn [ ] into [x]).

  • I have removed all code style changes that are not necessary (e.g. changing blanks across the whole file that don’t need to be changed, adding empty lines in parts other than your own code)
  • I am not making any changes to files that don’t have any effect (e.g. imports added that don’t need to be added)
  • I do not have any sysout statements in my code or commented out code that isn’t needed anymore
  • I am not reformatting any files in the wrong format or without cause.
  • I am not changing file encoding or line endings to something else than UTF-8, LF
  • My pull request does not show an insane amount of files being changed although my ticket only requires a few files being changed
  • I have added Javadoc/documentation where appropriate
  • I have added test cases where appropriate
  • I have explained any part of my code/implementation decisions that is not be self-explanatory

Please provide a brief description of your ticket

https://diging.atlassian.net/browse/CITE-212

... Put ticket description here and add link to ticket ...

Are there any other pull requests that this one depends on?

Anything else the reviewer needs to know?

... describe here ...

@diging-jenkins
Copy link

Can one of the admins verify this patch?

@diya17 diya17 requested a review from jdamerow March 13, 2024 17:07

if (group == null) {
logger.error("User " + user.getUsername() + " does not have access to group " + zoteroGroupId);
return "error/404";
Copy link
Member

Choose a reason for hiding this comment

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

if the user doesn't have access they should get a 403.

breadCrumbs.add(new BreadCrumb(group.getName(), BreadCrumbType.GROUP, group.getGroupId() + "", group));
Collections.reverse(breadCrumbs);
model.addAttribute("breadCrumbs", breadCrumbs);
return "auth/group/items";
Copy link
Member

Choose a reason for hiding this comment

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

that looks like a lot of duplicate code; should be more DRY.

@jdamerow jdamerow closed this Apr 10, 2024
foundCitations.add(mapReference(r));
});
return new ResultPage(foundCitations, results.getTotalElements(), results.getTotalPages());
}
Copy link
Member

Choose a reason for hiding this comment

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

isn't this pretty much the same code as in the search method above? DRY


Gson gson = new Gson();
return gson.toJson(searchItemsData, SearchItemsDataDto.class);
}
Copy link
Member

Choose a reason for hiding this comment

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

same here, looks like pretty much the same as the above method. I actually doubt you'll need two separate methods.

@jdamerow jdamerow closed this Aug 27, 2025
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.

4 participants