Project

General

Profile

« Previous | Next » 

Revision 61441

merged branch aai_roles_new to trunk

View differences:

ValidatorController.java
38 38
            consumes = MediaType.APPLICATION_JSON_VALUE,
39 39
            produces = MediaType.APPLICATION_JSON_VALUE)
40 40
    @ResponseBody
41
    @PreAuthorize("hasRole('ROLE_USER') and #jobForValidation.userEmail == authentication.userInfo.email")
41
    @PreAuthorize("hasAuthority('REGISTERED_USER') and #jobForValidation.userEmail == authentication.userInfo.email")
42 42
    public JobForValidation submitJobForValidation(@RequestBody JobForValidation jobForValidation) throws ValidatorServiceException {
43 43
        return validatorService.submitJobForValidation(jobForValidation);
44 44
    }
......
47 47
            consumes = MediaType.APPLICATION_JSON_VALUE,
48 48
            produces = MediaType.APPLICATION_JSON_VALUE)
49 49
    @ResponseBody
50
    @PreAuthorize("hasRole('ROLE_USER')")
50
    @PreAuthorize("hasAuthority('REGISTERED_USER')")
51 51
    public ResponseEntity<Object> reSubmitJobForValidation(@PathVariable("jobId") String jobId) throws JSONException, ValidatorServiceException {
52 52
        return validatorService.reSubmitJobForValidation(((OIDCAuthenticationToken) SecurityContextHolder.getContext().getAuthentication()).getUserInfo().getEmail(), jobId);
53 53
    }
......
78 78

  
79 79
    @RequestMapping(value = "/getStoredJobsNew" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
80 80
    @ResponseBody
81
    @PreAuthorize("hasRole('ROLE_USER')")
81
    @PreAuthorize("hasAuthority('REGISTERED_USER')")
82 82
    public List<StoredJob> getStoredJobsNew(@RequestParam(value = "jobType", required = false)
83 83
                                            @ApiParam(value = "Equals to filter job type on validation history page") String jobType,
84 84
                                            @RequestParam("offset") @ApiParam(value = "Page number", required = true) String offset,

Also available in: Unified diff