everyvote / everyvote_mini

Election information app for university student governments and other organizations
www.everyvote.org
1 stars 0 forks source link

Add Block Users feature #13

Open mitchdowney opened 11 years ago

mitchdowney commented 11 years ago

In the Edit Election menu, the moderators for a specific election need the ability to block users. Users that are blocked should be removed from the candidate list, and should have all of their comments removed that the blocked user posted to candidate profiles within only that election.

In other words, the block users function (for the MVP) should remove all traces of the blocked user only in the election that user is blocked from.

Below is an image from the previous evmini of the blocked users field on the Edit Election page:

image

mitchdowney commented 11 years ago

assigned yew vince since you already started this

mitchdowney commented 11 years ago

This is working on my local runserver, but is currently wonky on www.everyvote.org. For example, if I block Abraham Lincoln and Albert Einstein in the EVU - Student Union - Fall 2013 election, neither Abe or Albert are blocked, but Booker T Washington and Frederick Douglass are blocked.

I suspect what's going wrong has to do with the fact userprofile.id is consistently 10 digits higher than its corresponding user.id. I'm not sure how to fix it though.

scvnc commented 11 years ago

I could be user #2 but my userprofile could be #20001 for all I could care.

mitchdowney commented 11 years ago

I cannot reproduce this issue locally with the current repo at https://github.com/everyvote/everyvote_mini/tree/mitch_september

So I pushed the relevant pieces for this issue from mitch_september to the everyvote server, dropped all of the existing database tables, ran syncdb, and populated the app with new data. Now blocked_users is blocking the correct users. Maybe this is fixed? Or maybe this is a timebomb issue waiting to break? In case it appears to be at least temporarily fixed right now, and if it is, this sucka is MVP!

scvnc commented 11 years ago

I'm voting on timebomb until we explain the interactions with user and userprofile