feat: added roles requirement for critical ji operations
This commit is contained in:
parent
2279f23ac4
commit
9039e3d3f6
@ -37,6 +37,7 @@ public class JiResource {
|
|||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/create")
|
@Path("/create")
|
||||||
|
@RolesAllowed("root")
|
||||||
public Response createJi(@QueryParam("name") String name, @QueryParam("desc") String desc, @QueryParam("address") String address, @QueryParam("respo") String respo, @QueryParam("site") String name_site) {
|
public Response createJi(@QueryParam("name") String name, @QueryParam("desc") String desc, @QueryParam("address") String address, @QueryParam("respo") String respo, @QueryParam("site") String name_site) {
|
||||||
try {
|
try {
|
||||||
Ji jsp = jiService.createJi(name, desc, address, respo, name_site);
|
Ji jsp = jiService.createJi(name, desc, address, respo, name_site);
|
||||||
@ -60,6 +61,7 @@ public class JiResource {
|
|||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/del")
|
@Path("/del")
|
||||||
|
@RolesAllowed("root")
|
||||||
@APIResponses({
|
@APIResponses({
|
||||||
@APIResponse(responseCode = "200", description = "Successfully deleted"),
|
@APIResponse(responseCode = "200", description = "Successfully deleted"),
|
||||||
@APIResponse(responseCode = "500", description = "Internal server error, usually site not found")
|
@APIResponse(responseCode = "500", description = "Internal server error, usually site not found")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user