1 The idea behind this would be to have one ikiwiki behave as a dynamic private wiki in a specified area
2 and a more static publiczone wiki. Actually private wiki page can be addressed via a *pagespec*.
4 What is ready /can be done:
6 * We already can more or less do this for example with [[httpauth|/plugins/httpauth/]], *.htaccess* files and a proper *httpauth_pagespec*
7 yet at the cost of maintaining two different user/pass logbase (native ikiwiki signin)
8 * Furthermore we can [[lockedit|plugins/lockedit/]] some pagespecs, ie in the public zone.
10 What is problematic is when you link a public page in a private page :
11 a backlink will be generated from the public page to the private page.
13 As I noticed in [[per_page_ACLs]] in the end users through backlink
14 navigation will frequently hit HTTP/401 deterring browsing as well as for the admin at false-positive logwatching.
16 One can radically [[disable backlinks feature|todo/allow_disabling_backlinks]] but then no more neat backlink navigation that
17 is really good to have in both area.
19 I think of just preventing this backlink leak in that case would be sufficient via i.e a *privatebacklinks* config and
28 diff --git a/IkiWiki.pm b/IkiWiki.pm
31 @@ -294,6 +294,14 @@ sub getsetup () {
35 + privatebacklinks => {
38 + description => "PageSpec controlling which backlinks are private (ie users/*)",
39 + link => "ikiwiki/PageSpec",
46 diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
47 --- a/IkiWiki/Render.pm
48 +++ b/IkiWiki/Render.pm
49 @@ -52,7 +52,8 @@ sub backlinks ($) {
50 $p_trimmed=~s/^\Q$dir\E// &&
51 $page_trimmed=~s/^\Q$dir\E//;
53 - push @links, { url => $href, page => pagetitle($p_trimmed) };
54 + push @links, { url => $href, page => pagetitle($p_trimmed) }
55 + unless defined $config{privatebacklinks} && length $config{privatebacklinks} && pagespec_match($p, $config{privatebacklinks}) && !pagespec_match($page, $config{privatebacklinks}) ;