soapRight Interface

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3836 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 18 years ago
parent 02fc958d14
commit 3e24ee8e09

@ -64,6 +64,7 @@
<input type="checkbox" id="blog" name="blogRight"#(blogRight)#:: checked="checked"#(/blogRight)# /><label for="blog">Blog</label><br />
<input type="checkbox" id="wiki" name="wikiAdminRight"#(wikiAdminRight)#:: checked="checked"#(/wikiAdminRight)# /><label for="wiki">Wiki Admin</label><br />
<input type="checkbox" id="bkmark" name="bookmarkRight"#(bookmarkRight)#:: checked="checked"#(/bookmarkRight)# /><label for="bkmark">Bookmarks</label>
<input type="checkbox" id="soap" name="soapRight"#(soapRight)#:: checked="checked"#(/soapRight)# /><label for="soap">SOAP</label>
</dd>
<dt><label for="tlimit">Timelimit</label>:</dt>
<dd><input type="text" id="tlimit" name="timelimit" value="#[timelimit]#" /></dd>

@ -81,6 +81,7 @@ public class User_p {
prop.put("adminRight", 0);
prop.put("wikiAdminRight", 0);
prop.put("bookmarkRight", 0);
prop.put("soapRight", 0);
prop.put("users", 0);
@ -115,6 +116,7 @@ public class User_p {
prop.put("blogRight", (entry.hasRight(userDB.Entry.BLOG_RIGHT)?1:0));
prop.put("wikiAdminRight", (entry.hasRight(userDB.Entry.WIKIADMIN_RIGHT)?1:0));
prop.put("bookmarkRight", (entry.hasRight(userDB.Entry.BOOKMARK_RIGHT)?1:0));
prop.put("soapRight", (entry.hasRight(userDB.Entry.SOAP_RIGHT)?1:0));
}
}else if( post.containsKey("delete_user") && !((String)post.get("user")).equals("newuser") ){
sb.userDB.removeEntry((String)post.get("user"));
@ -143,6 +145,7 @@ public class User_p {
String blogRight=( post.containsKey("blogRight")&&((String)post.get("blogRight")).equals("on") ? "true" : "false");
String wikiAdminRight=( post.containsKey("wikiAdminRight")&&((String)post.get("wikiAdminRight")).equals("on") ? "true" : "false");
String bookmarkRight=( post.containsKey("bookmarkRight")&&((String)post.get("bookmarkRight")).equals("on") ? "true" : "false");
String soapRight=( post.containsKey("soapRight")&&((String)post.get("soapRight")).equals("on") ? "true" : "false");
HashMap mem=new HashMap();
if( post.get("current_user").equals("newuser")){ //new user
@ -160,6 +163,7 @@ public class User_p {
mem.put(userDB.Entry.BLOG_RIGHT, blogRight);
mem.put(userDB.Entry.WIKIADMIN_RIGHT, wikiAdminRight);
mem.put(userDB.Entry.BOOKMARK_RIGHT, bookmarkRight);
mem.put(userDB.Entry.SOAP_RIGHT, soapRight);
try{
entry=sb.userDB.createEntry(username, mem);
@ -191,6 +195,7 @@ public class User_p {
entry.setProperty(userDB.Entry.BLOG_RIGHT, blogRight);
entry.setProperty(userDB.Entry.WIKIADMIN_RIGHT, wikiAdminRight);
entry.setProperty(userDB.Entry.BOOKMARK_RIGHT, bookmarkRight);
entry.setProperty(userDB.Entry.SOAP_RIGHT, soapRight);
}catch (IOException e){
}
}else{

Loading…
Cancel
Save