@PreAuthorize("isDomainAdmin(#id) or hasRole('ROLE_ADMIN')")
@RequestMapping(value = "/manager/requestsPending/{id}", method = RequestMethod.GET)
public String requestsPending(@PathVariable Long id, Model model) {
Domain domain = domainService.get(id);
if (domain == null) {
throw new EntityNotFoundException(String.format("Domain entity not found while viewing pending invites: %s", id));
}
model.addAttribute("domainType", domain.getDomainType().name());
model.addAttribute("domainName", domain.getName());
model.addAttribute("domainId", domain.getId());