I've found out, that it would be nice to show the user on which link should he click and on which should not. If there is a page a user is disabled to read by ACL an error page appears instead. This is fine, one references a page like this the user will not know about the restriction untill he clicks on the link. Thats not very nice.
I've find out the easy way. Let's mark disabled links like the non/existed links marked in the referenced page.
You can see, that this only works, if the pages is rendered for each user personaly. This means that the cache should be turned off. I did not want to turn off the site cache (because of performance reasons), so I've created a per-page caching solution in the pagecache plugin.
This way disabled links will be appear red, like unexisting links.
~~NOCACHE~~ marker should be set for pages that may reference authenticated pages. Orelse strange things will happen for the user.
File inc/pageutils.php at the end of the resolve_pageid function (line 386) add the following code.
if($exists) { if(auth_quickaclcheck($page) == 0) { $exists = false; } }
Good point. Links to pages a user has no access to should not be presented as normal links. However, I find it confusing to use the same color as for non-existing pages, as the user cannot create this page. To me it would make more sense if the link title just appeared as normal text for non-priviledged users.
And, this is not really a plugin. Maybe you better move it to the wiki:tips: namespace. — Esther Brunner 2007-01-03 16:36
This could be realised as a proper plugin, including the cache handling. A “link replacement syntax plugin”. — Viktor Söderqvist 2007-01-22 14:30