Last modified: 2005-11-05 08:45:30 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 3111 - isAllowed('asksql') doesn't work
isAllowed('asksql') doesn't work
Product: MediaWiki extensions
Classification: Unclassified
AskSQL (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2005-08-10 21:47 UTC by Michael Diederich
Modified: 2005-11-05 08:45 UTC (History)
0 users

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


Description Michael Diederich 2005-08-10 21:47:59 UTC
Hi all,

if( !$wgUser->isAllowed('asksql') ) {

doesn't work. In the file Defines.php is the array with the rights:

$wgAvailableRights = array('read', 'edit', 'move', 'delete', 'undelete',
'protect', 'block', 'userrights', 'createaccount', 'upload',
'rollback', 'patrol', 'editinterface', 'siteadmin', 'bot', 'validate', 
'import', 'importupload', 'renameuser' );

As 'asksql' is missed, even sysops can't execute the asksql. Unfortunately i am
not sure how

function isAllowed($action='') {
	return in_array( $action , $this->mRights );

works. (Otherwise i would submit a patch..)
Comment 1 Tim Starling 2005-08-10 21:51:09 UTC
Try $wgAvailableRights[] = 'asksql' in the extension setup function. You may
also want to add a group with that right.
Comment 2 Brion Vibber 2005-08-11 06:46:14 UTC
What doesn't work about it?

(Note that there is no Special:Asksql, it was removed long ago.)
Comment 3 Michael Diederich 2005-08-11 09:51:25 UTC
(In reply to comment #2)
> What doesn't work about it?
> (Note that there is no Special:Asksql, it was removed long ago.)

I have copyed the extension into my extenstions directory. I set the wgAllowSql
(or so) true and set the user/pass for sql-querys. I get an error, i need to be
sysop even when I am. When i comment out line 67:

if( !$wgUser->isAllowed('asksql') ) {

it works without any problems. 

askSQL is very usefull, when you have a non utf-8 shell and need sql-queries for
the wikipedia. I thought it would only be a small fix for my problem :-|
Comment 4 Brion Vibber 2005-08-11 10:03:25 UTC
Did you set up a user group with that permission? Something like:

$wgGroupPermissions['sysop']['asksql'] = true;

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