[Mediawiki-l] Working on upgrading to 1.7.1

Petr Andreyev gulliput at gmail.com
Fri Jul 14 18:22:13 UTC 2006


Hi Dan,

> Using your NamespacePermissions extension, is there a way to retrieve
> a list of namespaces to which a user has RO or RW access?
>

One can know if a user is in one of the autocreated groups:
ex.
           in_array( "ns{$ns_title}RO", $user->getGroups() );

It is possible also to know if a user can do a particular action with
an article in a namespace:
e.g.
           $user->isAllowed( "ns100_read" ).
This is a more adequate way to obtain access permissions for a given
namespace, since the access level is determined by permissions;
autogroups just contain most usable sets of permissions.

Petr



More information about the MediaWiki-l mailing list