From 92c49b406b1e51f3f3d5be327e6b55ef77285ec0 Mon Sep 17 00:00:00 2001 From: allo Date: Fri, 28 Oct 2005 18:06:36 +0000 Subject: [PATCH] adminAuth with userDB and adminAuthenticated (fix for statuspage) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1001 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaSwitchboard.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java index e512a3b46..9bedd45f7 100644 --- a/source/de/anomic/plasma/plasmaSwitchboard.java +++ b/source/de/anomic/plasma/plasmaSwitchboard.java @@ -1736,6 +1736,9 @@ 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.standardCoder.encodeMD5Hex(authorization))) return 4; // hard-authenticated, all ok + userDB.Entry entry = this.userDB.proxyAuth((String)header.get(httpHeader.AUTHORIZATION, "xxxxxx")); + if(entry.hasAdminRight()) + return 4; return 0; // wrong password }