feat: added roles requirement for critical ji operations

This commit is contained in:
Arthur Wambst 2025-07-29 18:12:02 +02:00
parent 2279f23ac4
commit 9039e3d3f6

View File

@ -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 {