Joachim Durchholz wrote:
My idea was to have "user groups" in the
wiki, and a per-page list of
groups that may read or write it.
The docs were of limited help. A remark somewhere in them reads "it's
possible to do your own permission scheme", but I found nothing that
supported that claim. In fact all the permission stuff that's in
Mediawiki seems to be hardcoded, at least a few quick greps indicated so.
You can theoretically build a users/groups permissions scheme using the
user_rights and cur_restrictions fields (both are comma-separated sets
of text tokens and can be fairly arbitrarily extended), but as you
noticed this isn't supported by the current code which is hard-coded and
special-cased for a few values.
If you want to try this, start by rewriting Title::userCanEdit() and
Title::userCanRead(), which control write and read access to given
pages. You'd also need to add a more intelligent way to assign page
permissions & user privileges.
My questions are:
How do I go ahead?
Are there better ways to achieve what we want?
Honestly, I'd recommend you just give all your users read/write
permission to all pages... If they change things they're not supposed to
it's recorded in the audit trail and incorrect changes can be easily
-- brion vibber (brion @ pobox.com