On Wed, May 28, 2008 at 6:17 AM, <raymond(a)svn.wikimedia.org> wrote:
Remove link to Special:Userrights for the moment as
$wgUser->isAllowed( 'userrights' ) seems to strict in some cases
I think you want $userrights->userCanExecute( $wgUser ). In fact,
that's the generic way to check for permissions on special pages,
although in all other cases I know of it just falls back to
User::isAllowed.
The catch is that you'll have to instantiate a SpecialPage object,
although you won't actually be visiting the special page. It looks
like it should work, from reading the code, although you might want to
initialize UserrightsPage::$isself to true rather than false.