Last modified: 2010-05-15 15:37:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 3126 - Enhancement to allow "protected" namespaces
Enhancement to allow "protected" namespaces
Status: RESOLVED DUPLICATE of bug 2073
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.5.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-12 13:24 UTC by Neil Winton
Modified: 2010-05-15 15:37 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to implement protected namespaces (1.69 KB, patch)
2005-08-12 13:35 UTC, Neil Winton
Details

Description Neil Winton 2005-08-12 13:24:08 UTC
The new group permission mechanism allows the possible extension to supporting
"protected" namespaces. Pages in such a namespace can only be accessed by people
who are members of specific groups. While this is in some way counter to the
"open" spirit of wikis, it is very useful in, for example, an enterprise
environment where there may be some information which should not be completely
publicly accessible. A simple patch to Title.php (attached) shows a possible
implementation.
Comment 1 Neil Winton 2005-08-12 13:35:27 UTC
Created attachment 776 [details]
Patch to implement protected namespaces

This patch affects only includes/Title.php. It introduces a new global
variable, $wgProtectedNamespaces. If this is set, it should be a list of
namespaces whose pages are to be specially protected. For each namespace, e.g.
"Foo", in the list only people who are members of the group "ns-Foo" will be
able to access pages within that namespace.

To give a concrete example, additions to LocalSettings.php might be:

 $wgExtraNamespaces = array(100 => "Foo", 101 => "Foo_talk");
 $wgGroupPermissions['ns-Foo']['read'] = true;
 $wgGroupPermissions['ns-Foo_talk']['read'] = true;
 $wgProtectedNamespaces = array('Foo', 'Foo_talk');

Now only users who are members of the group 'ns-Foo' will be able to access
pages in the 'Foo' namespace. Note that to access 'Foo_talk' pages they must
also be members of 'ns-Foo_talk', there is no implicit association.

The permission used in $wgGroupPermissions (here 'read') is largely irrelevant
as it is only the membership of the group that is important. Using 'read' will
generally be safe because a user is going to need that globally anyway!

There is a very small overhead added on normal page reads (the addition of an
existence check on $wgProtectedPages). I hope this is acceptable.
Comment 2 Zigger 2005-08-12 17:06:42 UTC

*** This bug has been marked as a duplicate of 2073 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links