Following T271270: Create new logging table in SecurePoll, log when admins are added to or removed from an election.
This task is only for adding a row to the log table.
Details of how we could do this are outlined in T270313#6707097.
Tchanders | |
Jan 5 2021, 10:05 PM |
F34100383: admin_list.png | |
Feb 11 2021, 10:28 AM |
F34100398: log_multiple.png | |
Feb 11 2021, 10:28 AM |
F34100387: log_misleading.png | |
Feb 11 2021, 10:28 AM |
Following T271270: Create new logging table in SecurePoll, log when admins are added to or removed from an election.
This task is only for adding a row to the log table.
Details of how we could do this are outlined in T270313#6707097.
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Log when an admin is added to or removed from an election | mediawiki/extensions/SecurePoll | master | +62 -0 |
Change 655746 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/SecurePoll@master] WIP Log when an admin is added to or removed from an election
Change 655746 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Log when an admin is added to or removed from an election
If you add or remove admins when editing an election, this gets recorded in Special:SecurePollLog.
When creating an election, the admins you have chosen are not recorded in the log. I guess this is not necessary.
If you don't touch the admins when editing (even if you change their order) nothing gets recorded in the logs.
In case of regression, I tested adding and removing an admin on beta, which does not have logging enabled.
With JS disabled, there can be some weird behaviour. For example, if you change the election admin from Other Electionadmin to Other_Electionadmin, we appear to treat them as two different users and you get a misleading log entry:
Also, something I think @Tchanders mentioned in the code review comments, is that we are taking user ids from the user table, when we should now be using the actor table. Perhaps there should be a follow up task for that. The same goes for T271276 (which I forgot to comment on that ticket).
Test Environments
Also, something I think @Tchanders mentioned in the code review comments, is that we are taking user ids from the user table, when we should now be using the actor table. [...]
As discussed in a meeting, we went with the user table in the end, so this is correct.