Revision 51656
Added by Panagiotis Kanakakis about 6 years ago
MonitorApiImpl.java | ||
---|---|---|
9 | 9 |
import io.swagger.annotations.ApiParam; |
10 | 10 |
import org.apache.log4j.Logger; |
11 | 11 |
import org.json.JSONException; |
12 |
import org.springframework.security.access.prepost.PreAuthorize; |
|
12 | 13 |
import org.springframework.stereotype.Component; |
13 | 14 |
import org.springframework.web.bind.annotation.RequestParam; |
14 | 15 |
|
... | ... | |
37 | 38 |
.getLogger(MonitorApiImpl.class); |
38 | 39 |
|
39 | 40 |
@Override |
41 |
@PreAuthorize("hasRole('ROLE_USER')") |
|
40 | 42 |
public JobsOfUser getJobsOfUser(@RequestParam("user") @ApiParam(value = "User email", required = true) String user, |
41 | 43 |
@RequestParam(value = "jobType", required = false) |
42 | 44 |
@ApiParam(value = "Equals to filter job type on validation history page") String jobType, |
... | ... | |
87 | 89 |
} |
88 | 90 |
|
89 | 91 |
@Override |
92 |
@PreAuthorize("hasRole('ROLE_USER')") |
|
90 | 93 |
public int getJobsOfUserPerValidationStatus(String user, |
91 | 94 |
String jobType, |
92 | 95 |
String validationStatus) throws JSONException { |
Also available in: Unified diff
Add PreAuthorize annotation on user methods.