Last modified: 2006-09-06 17:20:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T8927, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6927 - User login requested if not allowed to read
User login requested if not allowed to read
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Rotem Liss
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-04 22:37 UTC by Carl Duisberg
Modified: 2006-09-06 17:20 UTC (History)
1 user (show)

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


Attachments
Show necessary privileges to read for logged in users. (34.51 KB, patch)
2006-08-04 23:46 UTC, Carl Duisberg
Details
Show necessary privileges to read for logged in users. (813 bytes, patch)
2006-08-05 00:00 UTC, Carl Duisberg
Details

Description Carl Duisberg 2006-08-04 22:37:30 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 );
Comment 1 Carl Duisberg 2006-08-04 23:46:29 UTC
Created attachment 2197 [details]
Show necessary privileges to read for logged in users.

This patch solves the problem in mediawiki 1.8 alpha.
Comment 2 Carl Duisberg 2006-08-05 00:00:56 UTC
Created attachment 2198 [details]
Show necessary privileges to read for logged in users.

Checked in mediawiki 1.8 alpha
Comment 3 Brion Vibber 2006-08-31 16:59:07 UTC
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?
Comment 4 Carl Duisberg 2006-09-05 18:38:17 UTC
(In reply to comment #3)
The applicable function is:
user::getGroupName( $group )
Comment 5 Rotem Liss 2006-09-06 16:31:23 UTC
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.
Comment 6 Rotem Liss 2006-09-06 17:20:32 UTC
Fixed in r16428.

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


Navigation
Links