Adding Security expression for getOpenAireId
This commit is contained in:
parent
b94d136cfa
commit
13717263e6
|
@ -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')")
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_PROVIDE_ADMIN') or ((@repositoryService.getRepositoryById(#repositoryId).registeredBy==authentication.userInfo.email or @repositoryService.getRepositoryById(#repositoryId).registeredBy=='null') and hasRole('ROLE_USER'))")
|
||||
public String getOpenaireId(String repositoryid){
|
||||
return piWikService.getOpenaireId(repositoryid);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue