Page MenuHomePhabricator

Got $wgNamespaceProtection, lack $wgNamespaceNoWatch
Closed, InvalidPublic

Description

In includes/Namespace.php there is:
/**

  • Can pages in a namespace be watched? *
  • @param $index Int
  • @return bool
	 */

public static function isWatchable( $index ) {

		return $index >= NS_MAIN;

}

However, things are not so simple these days.

Now that there is $wgNamespaceProtection, administrators also need a
similar mechanism to say e.g., "don't encourage the user to watch a
page that is not even allowed to ever be created." Or who knows what
might be on the admin's mind.

You don't want to just "do they have read permission according to
$wgNamespaceProtection etc." as the basis for deciding if they can
watch a page. It is more complicated than that.

E.g., a NS_CATEGORY page that they are looking at because it has
members, but will never have content, because the admin has set
$wgNamespaceProtection[NS_CATEGORY]=$wgNamespaceProtection[NS_CATEGORY_TALK]=array('editinterface');
The admin doesn't want them thinking that watching it will notify them
when a new member is added to the category, etc. (As I bet it
currently doesn't.)

So anyways, you still need to offer the admin an array
($wgNamespaceNoWatch?)that he can tinker with like
$wgNamespaceProtection, so he can have the flexibility to institute
whatever devious watchlist restrictions he has in mind.

No rush, but will come in handy one day.


Version: 1.15.x
Severity: enhancement

Details

Reference
bz18184

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:32 PM
bzimport set Reference to bz18184.
bzimport added a subscriber: Unknown Object (MLST).

$wgNamespaceProtection has nothing to do with read rights. Nor is there any (core) way of managing per-namespace read rights.

I can't see any reason why a user shouldn't be allowed to watch a page they can't edit. Nor do I really see a reason for disallowing watching of any particular namespace, except those that can't be watched ($index < NS_MAIN). Inclined to say WONTFIX.

Will not fix this one since it is irrelevant.