Last modified: 2006-09-06 17:20:32 UTC
Using $wgGroupPermissions normal user can be disallowed to read pages that are not in $wgProxyWhitelist. The following coding is found in article.php: if ( !$this->mTitle->userCanRead() ) { $wgOut->loginToUse(); $wgOut->output(); exit; } This asks a user who is already logged in but does not have read privelege to logon. Solution: If a user is logged in and has not read privilege send an approriate message: $wgOut->permissionRequired( $permission );
Created attachment 2197 [details] Show necessary privileges to read for logged in users. This patch solves the problem in mediawiki 1.8 alpha.
Created attachment 2198 [details] Show necessary privileges to read for logged in users. Checked in mediawiki 1.8 alpha
This looks like it'll produce some ugly output with wfMsg("group-$group-member") if there is no such message defined for the group. I'd recommend using the existing function for getting visible group names. More generally, it maybe would make more sense to consolidate this sort of display, rather than making every permission error page separately look up group lists?
(In reply to comment #3) The applicable function is: user::getGroupName( $group )
Comment on attachment 2198 [details] Show necessary privileges to read for logged in users. This patch cannot be used now, since OutputPage::permissionRequired was changed in r15994, and this hack will no longer work.
Fixed in r16428.