[pmwiki-users] How to test permissions for target of link?

Lars Eighner surname at larseighner.com
Mon Oct 10 17:02:35 CDT 2011

I want to suppess links (both for create and existing pages) when the reader
does not have read permission for the target of the link.

I know how to do this absolutely by setting $LinkPageExistsFmt and

I know how to do this conditionally based on permissions for the current
page using CondAuth().  However, I do not know how to do this based on
the attributes of the target page.

I want to do this in PHP at the config level because I do not want to
introduce more markup complications for naive authors.


I want to use PmWiki for genealogy. I want pages pertaining to persons to be
named according to the person's name.  I want pages pertaining to historic
(i.e. deceased and presumed deceased) persons and consenting adults to be
publically readable.  But I want to conceal the identities of living adults
who have not given me permission and living children so they appear only to
family members who have read permissions.

So far, I make pages read-protected by default and remove the protection per
page as appropriate.  I suppress read protected pages from searches and
pagelists (including backlists).  I set source permissions to @lock.  I
think that covers everything except links to wiki pages (and plain text
narrative).  The problem is that even if I suppress the link from appearing
bare inline (by using link text or a caption if the link text is empty) the
name of the person will still appear when the browser displayes the link, as
most of them do at the bottom of the page when the cursor is over them or in
page info screens.  There are other ways to name pages of course, but this
might tax authors too much.

Solutions to the problem as stated above or mention of holes I may have
overlooked would be welcome.

Lars Eighner
8800 N IH35 APT 1191 AUSTIN TX 78753-5266

More information about the pmwiki-users mailing list