class BankDetailsManagementController {

    @PreAuthorize("hasPermission(#projectId, 'org.innovateuk.ifs.project.resource.ProjectCompositeId', 'ACCESS_BANK_DETAILS_SECTION')")
    @GetMapping("/review-all-bank-details")
    public String viewPartnerBankDetails(
            Model model,
            @P("projectId")@PathVariable("projectId") Long projectId,
            UserResource loggedInUser) {
        model.addAttribute("isCompAdminUser", loggedInUser.hasRole(COMP_ADMIN));

        final ProjectBankDetailsStatusSummary bankDetailsStatusSummary = bankDetailsRestService.getBankDetailsStatusSummaryByProject(projectId)
                .getSuccess();
        if (onlyOneOrganisationAndTheirBankDetailsAreRequired(bankDetailsStatusSummary)) {
            return format("redirect:/project/%d/organisation/%d/review-bank-details", projectId, bankDetailsStatusSummary.getBankDetailsStatusResources().get(0).getOrganisationId());
        }
        return doViewBankDetailsSummaryPage(bankDetailsStatusSummary, model);
    }

}