views:

832

answers:

8

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. ...).

+2  A: 

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 docs (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.
epochwolf
+1  A: 

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/

mjustin
A: 

You could use the Page Access Restriction extension: http://www.mediawiki.org/wiki/Extension:Page_access_restriction and groups to do this.

That being said mediawiki doesn't reccomend you do it...

(stolen from my answer here)

Adrian Archer
A: 

You could create MediaWiki Namespaces and assign certain users to a particular namespace. You have to be careful though... pages in new namespaces don't show up by default in searches on the site without editing the LocalSettings.php file. Refer to the documentation for more info.

See this semi-related thread.

Pete
+1  A: 

As others pointed out, this is not a core feature of MediaWiki.

Simplest solution might be to have a public and a private wiki with inter-wiki links. (Start by copying the original wiki and removing unwanted pages from the public installation, and adding redirects).

Another possibility might be to have separate namespaces for public and private pages, and restrict accessibility according to namespace in the config file.

devio
A: 

Maybe this link can help


It's highly extensible and flexible. Try it, who knows eh?

the_drow
+1  A: 

It does sound like you're trying to take MediaWiki places where it doesn't necessarily want to go, so I would suggest picking a better tool.

As wikis go, we went through a MediaWiki stage but ended up going with MindTouch Deki because it just looks and acts nicer, and it is easier to manage (for things like access control). You can find all the details on their site, I can just say that it worked great out of the box.

Here comes the good part: there is now a MediaWiki to Deki converter available. I can't vouch for it (being new and all), but since all the parts are free, my suggestion is you take a few hours and try to see what you can get going, you might just like the result.

Tiberiu Ana
+1  A: 

If you name a page to X/Y the link will be wiki/X/Y, which means yo can set access rights in in any good proxy like Apache HTTP based on "directory". You could connect the proxy to a windows domain or just a list of usernames.

Hugo