Page MenuHomePhabricator

Don't let autoconfirmed users see the result before voting
Closed, InvalidPublic

Description

I just don't want autoconfirmed users see the result before voting.

Because the result could affect their decision.

$wgGroupPermissions['autoconfirmed']['ajaxpoll-vote'] = true;
$wgGroupPermissions['autoconfirmed']['ajaxpoll-view-results'] = true;
$wgGroupPermissions['autoconfirmed']['ajaxpoll-view-results-before-vote'] = false;
$wgGroupPermissions['*']['ajaxpoll-view-results'] = true;
$wgGroupPermissions['*']['ajaxpoll-view-results-before-vote'] = true;

I want, people who do not have right to vote able to see the result, but autoconfirmed user have to vote and then see the results. However, by setting like previous anonymous can't see the result at all.

MW 1.22wmf9


Version: master
Severity: enhancement

Details

Reference
bz53622

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:09 AM
bzimport added a project: AJAXPoll.
bzimport set Reference to bz53622.

Zoglun, I never coded something for the "autoconfirmed" group, which members are a subgroup of group "user", are they ?

I studied https://www.mediawiki.org/wiki/Manual:Autoconfirmed_users .

So, in my view - please correct me - what you propose is merely an enhancement - and clearly it is not a bug: you already marked this bugzilla as "enhancement".

Can you confirm ?

So I "simply" have to code your idea ?

Have you ever considered to code it by yourself and attach the output of "diff -bru old-version new-version" to this bugzilla? It is easy, and I can assist you in case you haven't done that before (let me know).

Well Gries, I really don't know the "autoconfirmed" does not contained in the code. The "enhancement" should be marked by other user in bugzilla.

I don't know how to code, but I may able to find someone who can add this function into AJAX poll. If I find such person, I will contact you.

Thank you!

Zoglun, you misunderstood me.

I will code this for you. No problem.

Please be patient.

Oh! Oh! Sorry for my poor English comprehend.

Zoglun, I discovered the following problem with your idea:

  1. You said "I want, people who do not have right to vote able to see the result,"

So, in that way you say: an anonymous person will see the results

  1. When someone is autoconfirmed, you want to hide the results until the autoconfirmed person votes.
  1. This does not make sense, because the autoconfirmed person can simply log-out, becomes then "anonymous" and can then see the results.

It does not make sense.

Please tell me, if my analysis is correct.

YES, Yes and yes. If an autoconfirmed user want to see the result he/she can log off and then see it.

I would like this function because most Asians (especially Japanese and Chinese) would like to follow "majority decision". A common sense among Japanese is to see what others choice. Therefore a little accidental higher vote number in the beginning could lead to final winning when the choice does not really matter their own life. Also, when choice not really important they wouldn't log off to see the result. That's too much trouble.

I know even after people have chosen, they can change the option. But, when people made a decision, they tend to persist on their own choice, Which would lead to more trustable result.

If you can't agree with my logic, I still would like you to add autoconfirmed users' right control in seniority order. It is acceptable to prohibit users' who have lower level see and vote. However, sometimes I really need autoconfirmed users vote to see how they think the wiki could be improved.

Okay, I understand that you understand that it(the restriction not to be able to see results in your case) can be circumvented by clever users.

I will reconsider your wish, and try to implemented what you want in the next days.

Zoglun, I prepared tables so get a better view what is needed. Please can I ask you to check the six relevant modes ?

Perhaps I change the AJAXPoll code and code them as "six modes" rather than with "group permissions" to make the use of the extension easier.

Your mode is at the end.

+-------------------------------+-----------+------------------------+

anonymoususer
Standard+--------+---------------+
newbieautoconfirmed

+-------------------------------+-----------+--------+---------------+

can see results before voting000
-------------------------------+-----------+--------+---------------+
can vote011
-------------------------------+-----------+--------+---------------+
can see results after voting011

+-------------------------------+-----------+--------+---------------+

+-------------------------------+-----------+------------------------+

anonymoususer
Standard (poll closed)+--------+---------------+
newbieautoconfirmed

+-------------------------------+-----------+--------+---------------+

can see results before voting111
-------------------------------+-----------+--------+---------------+
can vote000
-------------------------------+-----------+--------+---------------+
can see results after voting11X

+-------------------------------+-----------+--------+---------------+

+-------------------------------+-----------+------------------------+

anonymoususer
Secret Ballot+--------+---------------+
newbieautoconfirmed

+-------------------------------+-----------+--------+---------------+

can see results before voting000
-------------------------------+-----------+--------+---------------+
can vote011
-------------------------------+-----------+--------+---------------+
can see results after voting000

+-------------------------------+-----------+--------+---------------+

+-------------------------------+-----------+------------------------+

anonymoususer
Open Ballot+--------+---------------+
newbieautoconfirmed

+-------------------------------+-----------+--------+---------------+

can see results before voting000
-------------------------------+-----------+--------+---------------+
can vote111
-------------------------------+-----------+--------+---------------+
can see results after voting111

+-------------------------------+-----------+--------+---------------+

+-------------------------------+-----------+------------------------+

anonymoususer
Fully Open Ballot+--------+---------------+
newbieautoconfirmed

+-------------------------------+-----------+--------+---------------+

can see results before voting111
-------------------------------+-----------+--------+---------------+
can vote111
-------------------------------+-----------+--------+---------------+
can see results after voting11X

+-------------------------------+-----------+--------+---------------+

+-------------------------------+-----------+------------------------+

anonymoususer
Zoglun's mode+--------+---------------+
newbieautoconfirmed

+-------------------------------+-----------+--------+---------------+

can see results before voting110
-------------------------------+-----------+--------+---------------+
can vote011
-------------------------------+-----------+--------+---------------+
can see results after voting111

+-------------------------------+-----------+--------+---------------+

I think "group permissions" may be better since unexpected request may comes out. Your "six modes" solution covered 99.9% situation. The (poll closed) mode is very useful, too!

If you decide to use the modes' solution, could you please change the last mode to "autoconfirmed user voting interference elimination" mode?

+-------------------------------+-----------+------------------------+

autoconfirmed votinganonymoususer
interference elimination+--------+---------------+
newbieautoconfirmed

+-------------------------------+-----------+--------+---------------+

can see results before voting110
-------------------------------+-----------+--------+---------------+
can vote001
-------------------------------+-----------+--------+---------------+
can see results after voting111

+-------------------------------+-----------+--------+---------------+

(In reply to comment #10)

I think "group permissions" may be better since unexpected request may comes
out.

It appears technically very complicated to code the modes based on the permissions, but I will try and decide then, when I actually start coding.

If you decide to use the modes' solution, could you please change the last
mode
to "autoconfirmed user voting interference elimination" mode?

Perhaps not this complicated name, but another one.

(In reply to comment #0)

$wgGroupPermissions['autoconfirmed']['ajaxpoll-vote'] = true;
$wgGroupPermissions['autoconfirmed']['ajaxpoll-view-results'] = true;
$wgGroupPermissions['autoconfirmed']['ajaxpoll-view-results-before-vote'] =
false;
$wgGroupPermissions['*']['ajaxpoll-view-results'] = true;
$wgGroupPermissions['*']['ajaxpoll-view-results-before-vote'] = true;

Looks like a misunderstanding of $wgGroupPermissions. Users get a specific permission bit once any of their user groups has the permission assigned. False values are actually ignored here (they're normally used to override default settings).

What you want might be $wgRevokePermissions. This is not well-documented on [[mw:Manual:User rights]] currently, and it should be.

Yes, the functionality you want is already present. Specifically, you want to use the following:
$wgRevokePermissions['autoconfirmed']['ajaxpoll-view-results-before-vote'] = true;
in addition to your other entries.

Since there doesn't appear to be an actual bug here, I'm closing this.