diff --git a/htroot/IndexMonitor.java b/htroot/IndexMonitor.java index dfc8e40a3..3a015f938 100644 --- a/htroot/IndexMonitor.java +++ b/htroot/IndexMonitor.java @@ -80,7 +80,7 @@ public class IndexMonitor { (post.containsKey("deleteentry"))) { String authorization = ((String) header.get("Authorization", "xxxxxx")); if (authorization.length() != 0) { - if (! switchboard.userDB.hasAdminRight(authorization)){ + if (! switchboard.verifyAuthentication(header, true)){ // force log-in (again, because wrong password was given) prop.put("AUTHENTICATE", "admin log-in"); return prop; diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java index 343370584..c122ee1a4 100644 --- a/source/de/anomic/plasma/plasmaSwitchboard.java +++ b/source/de/anomic/plasma/plasmaSwitchboard.java @@ -1891,8 +1891,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser if (authorization.length() == 0) return 1; // no authentication information given if ((((String) header.get("CLIENTIP", "")).equals("localhost")) && (adminAccountBase64MD5.equals(authorization))) return 3; // soft-authenticated for localhost if (adminAccountBase64MD5.equals(serverCodings.encodeMD5Hex(authorization))) return 4; // hard-authenticated, all ok - userDB.Entry entry = this.userDB.proxyAuth((String)header.get(httpHeader.AUTHORIZATION, "xxxxxx")); - if((entry != null) && (entry.hasAdminRight())) + if(userDB.hasAdminRight((String)header.get(httpHeader.AUTHORIZATION, "xxxxxx"))) return 4; return 0; // wrong password }