Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

added link on ViewProfile.html to EditProfile_p.html to make it easier to customize the peer the link appears only if the user has admin rights

orbiterfe948abd841e
diff --git a/htroot/ViewProfile.html b/htroot/ViewProfile.html
index 21755b964..454b439f5 100644
--- a/htroot/ViewProfile.html
+++ b/htroot/ViewProfile.html
@@ -63,6 +63,9 @@
#(/success)#
<p>View this profile as <a rel="meta" type="application/rdf+xml" title="rdf:foaf" href="ViewProfile.rdf?hash=#[hash]#">rdf:foaf</a> or
<a rel="alternate" type="text/x-vcard" title="vCard" href="ViewProfile.vcf?hash=#[hash]#">vCard</a></p>
+ #(edit)#::
+ <p>You can edit your profile <a href="/ConfigProfile_p.html">here</a></p>
+ #(/edit)#
#(display)#
#%env/templates/simplefooter.template%#
::
diff --git a/htroot/ViewProfile.java b/htroot/ViewProfile.java
index 3770de282..0b2435acb 100644
--- a/htroot/ViewProfile.java
+++ b/htroot/ViewProfile.java
@@ -61,6 +61,7 @@ public class ViewProfile {
final boolean authenticated = sb.adminAuthenticated(header) >= 2;
final int display = ((post == null) || (!authenticated)) ? 0 : post.getInt("display", 0);
prop.put("display", display);
+ prop.put("edit", authenticated ? 1 : 0);
final String hash = (post == null) ? null : post.get("hash");
if ((hash == null) || (sb.peers == null)) {