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
|
||||
@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) {
|
||||
try {
|
||||
Ji jsp = jiService.createJi(name, desc, address, respo, name_site);
|
||||
@ -60,9 +61,10 @@ public class JiResource {
|
||||
|
||||
@DELETE
|
||||
@Path("/del")
|
||||
@RolesAllowed("root")
|
||||
@APIResponses({
|
||||
@APIResponse(responseCode = "200", description = "Successfully deleted"),
|
||||
@APIResponse(responseCode = "500", description = "Internal server error, usually site not found")
|
||||
@APIResponse(responseCode = "200", description = "Successfully deleted"),
|
||||
@APIResponse(responseCode = "500", description = "Internal server error, usually site not found")
|
||||
})
|
||||
public Response deleteJiByName(@QueryParam("name") String name) {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user