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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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