Project

General

Profile

« Previous | Next » 

Revision 57761

Bug fix for Security Expressions

View differences:

modules/uoa-repository-manager-service/trunk/src/main/java/eu/dnetlib/repo/manager/controllers/PiWikController.java
161 161

  
162 162
    @RequestMapping(value = "/getOpenaireId/{repositoryId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
163 163
    @ResponseBody
164
    @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'))")
165
    public String getOpenaireId(String repositoryid){
166
        return piWikService.getOpenaireId(repositoryid);
164
    @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'))")
165
    public String getOpenaireId(@PathVariable("repositoryId") String repositoryId){
166
        return piWikService.getOpenaireId(repositoryId);
167 167
    }
168 168

  
169 169
    @RequestMapping(value = "/markPiwikSiteAsValidated/{repositoryId}" , method = RequestMethod.POST,

Also available in: Unified diff