Search code examples
securitymediawikiwiki

MediaWiki documentation with external user access control


We are using MediaWiki inhouse for our software and hardware documentation. It looks like granting / revoking "read access" to parts of the documentation for our external users - customers, project partners - is not easy to achieve. How could we control read access to some areas of the documentation based on user or role access rights?

Edit: I am asking this because I don't like to go back to the "old style" of documentation - storing Office documents in dozens of different locations, and nobody has a clue where they are. So if there is no way to give users limited access only to their product information, I am afraid that management will drop the whole MediaWiki solution and introduce something "new and better". (this could mean we have to transfer all content to a new system, formatting and hyperlinks would be lost etc. ...).


Many thanks for the comments and answers!

Some interesting informations are available at http://meta.wikimedia.org/wiki/Access_control

For example there is a HiddenWiki patch which seems to be in active development, located at http://sourceforge.net/projects/hiddenwiki/


Solution

  • MediaWiki is not really designed for disabling viewing of pages by registered users. I don't think you can do this without some pain.

    From the documentation (reformated):

    To have a page act normally for some users but be invisible to others, as is possible for instance in most forum software, is a very different matter. MediaWiki is designed for two basic access modes:

    • Everyone can view every single page on the wiki (with the possible exception of a few special pages). This is the mode used by Wikipedia and its sister projects.
    • Anonymous users can only view the Main Page and login page, and cannot edit any page. This is basically the same as the above, in terms of technical implementation (just an extra check for every page view), which is why it exists. This is the mode of operation used by certain private wikis such as those used by various Wikimedia committees.

    My school uses wikis the way you want to. A friend of mine set them up. He had to hack the software extensively to get it to work. From my experience in digging around in MediaWiki, you're in for a fun time trying to get this working.

    You have four options

    • Get a MediaWiki plugin and have upgrades break it.
    • Hack it yourself and redo the work each time you upgrade.
    • Use different wiki software.
    • Setup a new private wiki as described above.