[Fedora Elections] #36: Consider hiding historical elections
by fedora-badges
#36: Consider hiding historical elections
---------------------+------------------------------------------------------
Reporter: tremble | Owner: nigelj
Type: defect | Status: new
Priority: minor | Milestone: Future Release
Component: General | Version: 0.2.1
Keywords: |
---------------------+------------------------------------------------------
The list of elections is growing.
While we want to keep the information (probably), do we really want to
display more than the last X (15? - just over two releases, would show how
a current board member was elected) months worth of election, and just
tuck the rest behind a "historical eletcions" link
--
Ticket URL: <https://fedorahosted.org/elections/ticket/36>
Fedora Elections <https://fedorahosted.org/elections/>
Fedora Elections
10 years, 1 month
[Fedora Elections] #26: First submit should be preview
by fedora-badges
#26: First submit should be preview
-------------------------+--------------------------------------------------
Reporter: mmcgrath | Owner: nigelj
Type: enhancement | Status: new
Priority: major | Milestone:
Component: General | Version: 0.1.5
Keywords: |
-------------------------+--------------------------------------------------
Minor thing but I think it might help, when you vote. The first screen to
submit to should really say "preview" instead of submit since you're not
submitting the vote until the final screen.
--
Ticket URL: <https://fedorahosted.org/elections/ticket/26>
Fedora Elections <https://fedorahosted.org/elections/>
Fedora Elections
11 years, 11 months
[Fedora Elections] #28: Improvements for the Voting App: Allow voting multiple times
by fedora-badges
#28: Improvements for the Voting App: Allow voting multiple times
-------------------------+--------------------------------------------------
Reporter: ixs | Owner: nigelj
Type: enhancement | Status: new
Priority: major | Milestone:
Component: General | Version: 0.1.5
Keywords: |
-------------------------+--------------------------------------------------
Please allow voting multiple times with each later vote canceling the
previous votes. This easily allows to correct a mistake during the voting
procedure or accounts for changed opinion.
There has just been a bit of discussion on IRC where people accidentially
voted incorrectly and would have liked such a feature.
kthxbai
--
Ticket URL: <https://fedorahosted.org/elections/ticket/28>
Fedora Elections <https://fedorahosted.org/elections/>
Fedora Elections
11 years, 11 months
2 commits - elections2/controllers elections2/lib
by Pierre-YvesChibon
elections2/controllers/root.py | 11 +----------
elections2/lib/admin.py | 7 ++-----
elections2/lib/vote.py | 3 ++-
3 files changed, 5 insertions(+), 16 deletions(-)
New commits:
commit e8ad3c3b3c735cf7fb27173a405549fb8f2682fe
Author: Pierre-Yves Chibon py(a)chibon.fr <pingou(a)pingoured.fr>
Date: Tue Jul 26 10:31:39 2011 +0200
Clean and add authentication constraints
- Admin controller is only available for people in the rigth group
- Vote controller is only available for logged-in people.
diff --git a/elections2/lib/admin.py b/elections2/lib/admin.py
index d43fdea..19de935 100644
--- a/elections2/lib/admin.py
+++ b/elections2/lib/admin.py
@@ -44,6 +44,8 @@ import sqlalchemy, tg
identity = request.environ.get('repoze.who.identity')
class Admin(BaseController):
+ allow_only = predicates.in_group("elections")
+
def __init__(self, fas, appTitle):
#print dir(fas), fas.username
self.fas = fas
@@ -67,7 +69,6 @@ class Admin(BaseController):
@expose(template='elections2.templates.admin')
def index(self, *kw, **args):
- print "test"
electlist = model.DBSession.query(Elections).order_by(
Elections.start_date).filter('id>0').all()
elections = [{'id': e.id, 'alias': e.alias,
@@ -84,8 +85,6 @@ class Admin(BaseController):
print "here"
return dict(elections=elections)
- #print " -> ", request.environ.get("FAS_LOGIN_INFO")
- #(a)identity.require(identity.in_group("elections"))
@expose(template="elections2.templates.admnewe")
def newe(self, **kw):
print "newe"
@@ -122,7 +121,6 @@ class Admin(BaseController):
print "return"
return dict()
- #(a)identity.require(identity.in_group("elections"))
@expose(template="elections2.templates.admnewc")
def newc(self, **kw):
if "submit" in kw:
@@ -141,7 +139,6 @@ class Admin(BaseController):
else:
return dict()
- #(a)identity.require(identity.in_group("elections"))
@expose(template="elections2.templates.admedit")
def edit(self, eid=None, **kw):
print "**", eid, kw
diff --git a/elections2/lib/vote.py b/elections2/lib/vote.py
index 5308291..359e474 100644
--- a/elections2/lib/vote.py
+++ b/elections2/lib/vote.py
@@ -43,13 +43,14 @@ from datetime import datetime
import re
class Vote(BaseController):
+ allow_only = predicates.not_anonymous()
+
def __init__(self, fas, appTitle):
self.fas = fas
self.appTitle = appTitle
#TODO: This function will be split off into: default => submit =>
#confirm functions, hopefully it was simplify everything
- #(a)identity.require(identity.not_anonymous())
@expose(template="elections2.templates.vote")
def default(self, eid=None, **kw):
print dir(Elections)
commit 8bd3c82d58be8296a9c33876588726cb452f2d3c
Author: Pierre-Yves Chibon py(a)chibon.fr <pingou(a)pingoured.fr>
Date: Tue Jul 26 10:30:35 2011 +0200
Clean root controller and add log in mechanism for TG2
diff --git a/elections2/controllers/root.py b/elections2/controllers/root.py
index 7e84182..c8bb287 100644
--- a/elections2/controllers/root.py
+++ b/elections2/controllers/root.py
@@ -21,10 +21,6 @@ from elections2.model import *
from elections2.lib.admin import Admin
from elections2.lib.vote import Vote
-#import fedora.tg.tg2utils
-
-#from fedora.tg.controllers import login as fc_login
-#from fedora.tg.controllers import logout as fc_logout
from datetime import datetime
@@ -66,12 +62,7 @@ class RootController(BaseController):
@expose('elections2.templates.index')
def index(self):
"""Handle the front-page."""
- print "***************"
- print request.identity
- print "***************"
if request.identity:
- print request.identity.keys()
- print request.identity['username']
userid = request.identity['repoze.who.userid']
flash(_('Welcome back, %s!') % userid)
@@ -141,8 +132,8 @@ class RootController(BaseController):
curtime=curtime, votergroups=votergroups,
appTitle=self.appTitle, groupnamemap=groupnamemap)
- #(a)identity.require(identity.not_anonymous())
@expose(template="elections2.templates.verify")
+ @require(predicates.not_anonymous("Please log-in"))
def verify(self):
validvotes = {}
invalidvotes = {}
12 years, 9 months