diff --git a/src/main/java/eu/dnetlib/repo/manager/controllers/PiWikController.java b/src/main/java/eu/dnetlib/repo/manager/controllers/PiWikController.java index 4091826..96fd01f 100644 --- a/src/main/java/eu/dnetlib/repo/manager/controllers/PiWikController.java +++ b/src/main/java/eu/dnetlib/repo/manager/controllers/PiWikController.java @@ -161,7 +161,7 @@ public class PiWikController { @RequestMapping(value = "/getOpenaireId/{repositoryId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody - @PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_PROVIDE_ADMIN') or ((@piWikService.getPiwikSiteForRepo(#repositoryId).requestor==authentication.userInfo.email or @piWikService.getPiwikSiteForRepo(#repositoryId).requestor) and hasRole('ROLE_USER'))") + @PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_PROVIDE_ADMIN') or ((@piWikService.getPiwikSiteForRepo(#repositoryId).requestor==authentication.userInfo.email or @piWikService.getPiwikSiteForRepo(#repositoryId).requestor=='null') and hasRole('ROLE_USER'))") public String getOpenaireId(String repositoryid){ return piWikService.getOpenaireId(repositoryid); }