diff --git a/jams-react-client/src/views/Groups/Groups.js b/jams-react-client/src/views/Groups/Groups.js index 9399fa7c9a39ca7456c10415876237723fe3705f..d8286e2d87850971baad91dbe7ae7e12954639e8 100644 --- a/jams-react-client/src/views/Groups/Groups.js +++ b/jams-react-client/src/views/Groups/Groups.js @@ -204,7 +204,7 @@ export default function Groups() { let blueprintsOptions = [] let index = 0 if(blueprints.length === 0) - blueprintsOptions.push({ value: index, label: "No blueprint found"}) + blueprintsOptions.push({value: index, label: "No blueprint found"}) else { blueprints.map((blueprint) => { blueprintsOptions.push({value: index, label: blueprint.name}) @@ -283,6 +283,7 @@ export default function Groups() { onChange={handleBlueprintsChange} variant="outlined" children={blueprintsOptionsItems} + disabled={blueprints.length === 0} /> </Grid> </Grid> diff --git a/jams-server/src/main/java/net/jami/jams/server/servlets/api/admin/group/GroupServlet.java b/jams-server/src/main/java/net/jami/jams/server/servlets/api/admin/group/GroupServlet.java index ad6b445647ceb47a2f3c6dc5698bf49ec17b5698..efb4509a4f28d6bd1cc07144da85dbed03c69af5 100644 --- a/jams-server/src/main/java/net/jami/jams/server/servlets/api/admin/group/GroupServlet.java +++ b/jams-server/src/main/java/net/jami/jams/server/servlets/api/admin/group/GroupServlet.java @@ -7,6 +7,7 @@ import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; +import net.jami.jams.common.annotations.JsonContent; import net.jami.jams.common.annotations.ScopedServletMethod; import net.jami.jams.common.dao.StatementElement; import net.jami.jams.common.dao.StatementList; diff --git a/jams-server/src/main/java/net/jami/jams/server/servlets/api/admin/group/PolicyServlet.java b/jams-server/src/main/java/net/jami/jams/server/servlets/api/admin/group/PolicyServlet.java index c854f9fea021150f1a559ff2699c6a229d2298e0..a97ecb993586c6a9dc83d9ff3aad00171845322f 100644 --- a/jams-server/src/main/java/net/jami/jams/server/servlets/api/admin/group/PolicyServlet.java +++ b/jams-server/src/main/java/net/jami/jams/server/servlets/api/admin/group/PolicyServlet.java @@ -6,6 +6,7 @@ import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; +import net.jami.jams.common.annotations.JsonContent; import net.jami.jams.common.annotations.ScopedServletMethod; import net.jami.jams.common.dao.StatementElement; import net.jami.jams.common.dao.StatementList; @@ -24,6 +25,7 @@ public class PolicyServlet extends HttpServlet { @Override @ScopedServletMethod(securityGroups = {AccessLevel.ADMIN}) + @JsonContent protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {