-
Notifications
You must be signed in to change notification settings - Fork 4
Story/cite 185 - Managed authorities page should be filterable by import source #302
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
base: develop
Are you sure you want to change the base?
Conversation
…new attribute to the model for importedauthoritiessources
|
Can one of the admins verify this patch? |
| @RequestMapping("/auth/authority/list/{source}") | ||
| public String getAuthoritiesForSource(Model model, Authentication authentication, | ||
| @PathVariable("source") String source, @RequestParam(defaultValue = "1", required = false, value = "page") String page) { | ||
| System.out.println(source); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
| model.addAttribute("total", authoritiesPage.getTotalElements()); | ||
| model.addAttribute("totalPages", authoritiesPage.getTotalPages() > 0 ? authoritiesPage.getTotalPages() : 1); | ||
| model.addAttribute("currentPage", page); | ||
| return "auth/authorities/list"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code should be cleaned up with intentional empty lines to organize blocks and intentional newlines for parameters of long method calls.
| IUser user = (IUser) authentication.getPrincipal(); | ||
| List<ICitationGroup> userGroups = citationManager.getGroups(user); | ||
| Page<IAuthorityEntry> authoritiesPage = authorityService.getAll(user, | ||
| userGroups.stream().map(group -> group.getGroupId()).collect(Collectors.toList()),pageInt, authorityPageSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my comment below. This could for example be formatted something like:
Page<IAuthorityEntry> authoritiesPage = authorityService.getAll(
user,
userGroups.stream().map(group -> group.getGroupId()).collect(Collectors.toList()),
pageInt,
authorityPageSize);
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]).Please provide a brief description of your ticket
Managed authorities page should be filterable by import source
... Put ticket description here and add link to ticket ...
Once we know where an authority entry came from, it should be possible to filter the entries on the “Manage Authority Entries” page by source (e.g. show all from Viaf).
https://diging.atlassian.net/browse/CITE-185
Are there any other pull requests that this one depends on?
diging/citesphere-model#48
Anything else the reviewer needs to know?
... describe here ...