Description
I'm still trying to set up a user information system using DokuWiki, and it looks as though struct will be the best way to achieve this, but I either need struct to implement allowed viewers for certain schemas or to allow joining data from different pages. It seems to me that adding the management overhead of a second permission system in an external database to this complex setup will be problematic, and still needs code changes, so I suspect it will be more useful to myself and others to be able to use the built-in DokuWiki ACLs to control access to this data.
My current setup is to have a namespace, people:
which contains pages for individuals, e.g., people:iain.hallam
. I've got a second namespace set up with appropriate ACLs, people:confidential:
(with pages, e.g., people:confidential:iain.hallam
) so that information stored there can only be seen by users in a group confidential
.
I've defined two schemas, person
and person_confidential
, and assigned them to the appropriate paths, and I can now edit information on both the person page and the confidential page. My problem comes when I want to create an aggregation page (also restricted to the group confidential
) that shows public and private information together.
Since the schemas are stored as tables, I'd like to be able to have struct issue a query to join them both:
SELECT * FROM person LEFT JOIN person_confidential ON person.%page% = person_confidential.%page%;
I guess in struct syntax, this would modify the schemas line of the table output syntax somehow? Perhaps
---- struct table ----
schemas: person < person_confidential
join: person.%page% = person_confidential.%page%
cols: *
----
Is this a potential approach or is there a better way of protecting only a portion of struct data for an individual page?