Last modified: 2012-03-10 11:37:44 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 T37118, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35118 - AJAX Poll: Create a new user right and restrict voting to it
AJAX Poll: Create a new user right and restrict voting to it
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
AJAX Poll (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: T. Gries
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-10 07:47 UTC by T. Gries
Modified: 2012-03-10 11:37 UTC (History)
4 users (show)

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


Attachments

Description T. Gries 2012-03-10 07:47:06 UTC
option to allow only users with edit rights to vote, or only logged-in user, or...

filed for tracking
Comment 1 T. Gries 2012-03-10 07:47:54 UTC
enhancement
Comment 2 Krinkle 2012-03-10 07:50:50 UTC
Rephrasing bug summary. The extension should register a new user right and restrict voting to users with that user right.

Whether a new user group is created or whether anyone has this by default ('*', or 'autoconfirmed' or 'sysop' or 'user' etc.) is up to the local wiki to configure and shouldn't be part of the extension.
Comment 3 T. Gries 2012-03-10 08:10:44 UTC
(In reply to comment #2)
> Whether a new user group is created or whether anyone has this by default ('*',
> or 'autoconfirmed' or 'sysop' or 'user' etc.) is up to the local wiki to
> configure and shouldn't be part of the extension.

I will add (similar to what is in OpenID.php)

# new user rights
$wgAvailableRights[] = 'ajaxpoll-vote';
$wgAvailableRights[] = 'ajaxpoll-admin';
Comment 4 Krinkle 2012-03-10 08:15:39 UTC
Yes, something like that should be added to the extension.

And then probably a few more lines of code in another place to enforces these user rights.
Comment 5 T. Gries 2012-03-10 08:17:49 UTC
# new user rights
$wgAvailableRights[] = 'ajaxpoll-vote';
$wgAvailableRights[] = 'ajaxpoll-admin';

# uncomment to allow users to read access the dashboard
# default: everyone can vote
# $wgGroupPermissions['user']['ajaxpoll-vote'] = true;

# allow sysops to adminstrate the polls
$wgGroupPermissions['sysop']['ajaxpoll-admin'] = true;
Comment 6 T. Gries 2012-03-10 09:27:14 UTC
implemented in r113554
Comment 7 T. Gries 2012-03-10 11:37:44 UTC
(In reply to comment #6)
must use r113555 (r113554 lacks the server-side check)

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


Navigation
Links