Project

General

Profile

« Previous | Next » 

Revision 61371

1. changed user roles defined in the project to authorities given by the aai.
2. created method returning user roles with desired status (active, deleted).

View differences:

ValidatorServiceImpl.java
125 125
    }
126 126

  
127 127
    @Override
128
    @PreAuthorize("hasRole('ROLE_USER') and #jobForValidation.userEmail == authentication.userInfo.email")
128
    @PreAuthorize("hasAuthority('REGISTERED_USER') and #jobForValidation.userEmail == authentication.userInfo.email")
129 129
    public JobForValidation submitJobForValidation(JobForValidation jobForValidation) throws ValidatorServiceException {
130 130
        LOGGER.debug("Submit job for validation with id : " + jobForValidation.getDatasourceId());
131 131
        try {
......
153 153
    }
154 154

  
155 155
    @Override
156
    @PreAuthorize("hasRole('ROLE_USER') and #email == authentication.userInfo.email")
156
    @PreAuthorize("hasAuthority('REGISTERED_USER') and #email == authentication.userInfo.email")
157 157
    public ResponseEntity<Object> reSubmitJobForValidation(String email,
158 158
                                                           String jobId) throws JSONException, ValidatorServiceException {
159 159
        LOGGER.debug("Resubmit validation job with id : " + jobId);
......
240 240
    }
241 241

  
242 242
    @Override
243
    @PreAuthorize("hasRole('ROLE_USER')")
243
    @PreAuthorize("hasAuthority('REGISTERED_USER')")
244 244
    public List<StoredJob> getStoredJobsNew(String user,
245 245
                                            String jobType,
246 246
                                            String offset,

Also available in: Unified diff