- if (currentSone == null) {
- return new JsonObject().put("success", false).put("error", "auth-required");
- }
- if (!reply.getSone().equals(currentSone)) {
- return new JsonObject().put("success", false).put("error", "not-authorized");
+ if (!webInterface.getCore().isLocalSone(reply.getSone())) {
+ return createErrorJsonObject("not-authorized");