aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathdesc <mathdesc@web>2012-06-07 07:11:29 -0400
committeradmin <admin@branchable.com>2012-06-07 07:11:29 -0400
commite4f241ac2fd691a021c091d852497af667295f70 (patch)
tree487b9c24cb8545c800ce5aa4b57626533e9beaa8
parente7e11e657014c5774fd84d78359fc245f1b0a192 (diff)
downloadikiwiki-e4f241ac2fd691a021c091d852497af667295f70.tar
ikiwiki-e4f241ac2fd691a021c091d852497af667295f70.tar.gz
-rw-r--r--doc/todo/Zoned_ikiwiki.mdwn60
1 files changed, 60 insertions, 0 deletions
diff --git a/doc/todo/Zoned_ikiwiki.mdwn b/doc/todo/Zoned_ikiwiki.mdwn
new file mode 100644
index 000000000..ba21e3ca2
--- /dev/null
+++ b/doc/todo/Zoned_ikiwiki.mdwn
@@ -0,0 +1,60 @@
+The idea behind this would be to have one ikiwiki behave as a dynamic private wiki in a specified area
+and a more static publiczone wiki. Actually private wiki page can be addressed via a *pagespec*.
+
+What is ready /can be done:
+
+* We already can more or less do this for example with [[httpauth|/plugins/httpauth/]], *.htaccess* files and a proper *httpauth_pagespec*
+yet at the cost of maintaining two different user/pass logbase (native ikiwiki signin)
+* Furthermore we can [[lockedit|plugins/lockedit/]] some pagespecs, ie in the public zone.
+
+What is problematic is when you link a public page in a private page :
+a backlink will be generated from the public page to the private page.
+
+As I noticed in [[per_page_ACLs]] in the end users through backlink
+navigation will frequently hit HTTP/401 deterring browsing as well as for the admin at false-positive logwatching.
+
+One can radically [[disable backlinks feature|todo/allow_disabling_backlinks]] but then no more neat backlink navigation that
+is really good to have in both area.
+
+I think of just preventing this backlink leak in that case would be sufficient via i.e a *privatebacklinks* config and
+a below patch.
+
+Comments are welcome.
+
+[[mathdesc]]
+
+
+<pre>
+diff --git a/IkiWiki.pm b/IkiWiki.pm
+--- a/IkiWiki.pm
++++ b/IkiWiki.pm
+@@ -294,6 +294,14 @@ sub getsetup () {
+ safe => 1,
+ rebuild => 1,
+ },
++ privatebacklinks => {
++ type => "pagespec",
++ example => "",
++ description => "PageSpec controlling which backlinks are private (ie users/*)",
++ link => "ikiwiki/PageSpec",
++ safe => 1,
++ rebuild => 1,
++ },
+ hardlink => {
+ type => "boolean",
+ default => 0,
+diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
+--- a/IkiWiki/Render.pm
++++ b/IkiWiki/Render.pm
+@@ -52,7 +52,8 @@ sub backlinks ($) {
+ $p_trimmed=~s/^\Q$dir\E// &&
+ $page_trimmed=~s/^\Q$dir\E//;
+
+- push @links, { url => $href, page => pagetitle($p_trimmed) };
++ push @links, { url => $href, page => pagetitle($p_trimmed) }
++ unless defined $config{privatebacklinks} && length $config{privatebacklinks} && pagespec_match($p, $config{privatebacklinks}) && !pagespec_match($page, $config{privatebacklinks}) ;
+ }
+ return @links;
+ }
+
+</pre>