From a5a1f1936887e85a3fbbfab29531d5971361d9f2 Mon Sep 17 00:00:00 2001 From: f1ori Date: Sat, 3 May 2008 11:13:27 +0000 Subject: [PATCH] * 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 --- htroot/xml/bookmarks/xbel/xbel.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/htroot/xml/bookmarks/xbel/xbel.java b/htroot/xml/bookmarks/xbel/xbel.java index 002370d4c..177b60328 100644 --- a/htroot/xml/bookmarks/xbel/xbel.java +++ b/htroot/xml/bookmarks/xbel/xbel.java @@ -17,11 +17,19 @@ public class xbel { public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) { int count = 0;; - + prop.clear(); switchboard = (plasmaSwitchboard) env; isAdmin=switchboard.verifyAuthentication(header, true); - + + if(post != null) { + if(!isAdmin) { + if(post.containsKey("login")) { + prop.put("AUTHENTICATE","admin log-in"); + } + } + } + if(isAdmin) { count = recurseFolders(switchboard.bookmarksDB.getFolderList(isAdmin),"/",0,true,""); prop.put("xbel", count); @@ -79,4 +87,4 @@ public class xbel { } return count; } -} \ No newline at end of file +}