| .. | .. |
|---|
| 35 | 35 | import net.curisit.securis.db.LicenseStatus; |
|---|
| 36 | 36 | import net.curisit.securis.db.Pack; |
|---|
| 37 | 37 | import net.curisit.securis.db.User; |
|---|
| 38 | +import net.curisit.securis.db.User.Rol; |
|---|
| 38 | 39 | import net.curisit.securis.ioc.EnsureTransaction; |
|---|
| 39 | 40 | import net.curisit.securis.security.BasicSecurityContext; |
|---|
| 40 | 41 | import net.curisit.securis.security.Securable; |
|---|
| .. | .. |
|---|
| 111 | 112 | @POST |
|---|
| 112 | 113 | @Path("/request") |
|---|
| 113 | 114 | @Consumes(MediaType.APPLICATION_JSON) |
|---|
| 114 | | - @Securable |
|---|
| 115 | + @Securable(roles = Rol.API_CLIENT) |
|---|
| 115 | 116 | @Produces({ MediaType.APPLICATION_JSON }) |
|---|
| 116 | 117 | @EnsureTransaction |
|---|
| 117 | 118 | public Response createFromRequest(RequestBean request, @HeaderParam(LicenseManager.HEADER_LICENSE_NAME_OR_REFERENCE) String nameOrReference, |
|---|
| .. | .. |
|---|
| 135 | 136 | @POST |
|---|
| 136 | 137 | @Path("/request") |
|---|
| 137 | 138 | @Consumes(MediaType.MULTIPART_FORM_DATA) |
|---|
| 138 | | - @Securable |
|---|
| 139 | + @Securable(roles = Rol.API_CLIENT) |
|---|
| 139 | 140 | @Produces({ MediaType.APPLICATION_JSON }) |
|---|
| 140 | 141 | @EnsureTransaction |
|---|
| 141 | 142 | @SuppressWarnings("unchecked") |
|---|
| .. | .. |
|---|
| 168 | 169 | @POST |
|---|
| 169 | 170 | @Path("/renew") |
|---|
| 170 | 171 | @Consumes(MediaType.APPLICATION_JSON) |
|---|
| 171 | | - @Securable |
|---|
| 172 | + @Securable(roles = Rol.API_CLIENT) |
|---|
| 172 | 173 | @Produces({ MediaType.APPLICATION_JSON }) |
|---|
| 173 | 174 | @EnsureTransaction |
|---|
| 174 | 175 | public Response renewFromPreviousLicense(LicenseBean previousLic, @Context BasicSecurityContext bsc) throws IOException, SeCurisServiceException, SeCurisException { |
|---|
| .. | .. |
|---|
| 208 | 209 | @POST |
|---|
| 209 | 210 | @Path("/validate") |
|---|
| 210 | 211 | @Consumes(MediaType.APPLICATION_JSON) |
|---|
| 211 | | - @Securable |
|---|
| 212 | + @Securable(roles = Rol.API_CLIENT) |
|---|
| 212 | 213 | @Produces({ MediaType.APPLICATION_JSON }) |
|---|
| 213 | 214 | @EnsureTransaction |
|---|
| 214 | 215 | public Response validate(LicenseBean currentLic, @Context BasicSecurityContext bsc) throws IOException, SeCurisServiceException, SeCurisException { |
|---|
| .. | .. |
|---|
| 242 | 243 | @POST |
|---|
| 243 | 244 | @Path("/renew") |
|---|
| 244 | 245 | @Consumes(MediaType.MULTIPART_FORM_DATA) |
|---|
| 245 | | - @Securable |
|---|
| 246 | + @Securable(roles = Rol.API_CLIENT) |
|---|
| 246 | 247 | @Produces({ MediaType.APPLICATION_JSON }) |
|---|
| 247 | 248 | @EnsureTransaction |
|---|
| 248 | 249 | @SuppressWarnings("unchecked") |
|---|