* allow to force login for xbel, needed for yacybar

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4757 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
f1ori 17 years ago
parent 8d83febb95
commit a5a1f19368

@ -17,11 +17,19 @@ public class xbel {
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch<?> env) { public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch<?> env) {
int count = 0;; int count = 0;;
prop.clear(); prop.clear();
switchboard = (plasmaSwitchboard) env; switchboard = (plasmaSwitchboard) env;
isAdmin=switchboard.verifyAuthentication(header, true); isAdmin=switchboard.verifyAuthentication(header, true);
if(post != null) {
if(!isAdmin) {
if(post.containsKey("login")) {
prop.put("AUTHENTICATE","admin log-in");
}
}
}
if(isAdmin) { if(isAdmin) {
count = recurseFolders(switchboard.bookmarksDB.getFolderList(isAdmin),"/",0,true,""); count = recurseFolders(switchboard.bookmarksDB.getFolderList(isAdmin),"/",0,true,"");
prop.put("xbel", count); prop.put("xbel", count);
@ -79,4 +87,4 @@ public class xbel {
} }
return count; return count;
} }
} }

Loading…
Cancel
Save