svn commit: r235753 - user/des/fbce/lib/FBCE/Controller
Dag-Erling Smorgrav
des at FreeBSD.org
Mon May 21 23:41:40 UTC 2012
Author: des
Date: Mon May 21 23:41:39 2012
New Revision: 235753
URL: http://svn.freebsd.org/changeset/base/235753
Log:
Verify that the user is an active committer.
Modified:
user/des/fbce/lib/FBCE/Controller/Run.pm
user/des/fbce/lib/FBCE/Controller/Vote.pm
Modified: user/des/fbce/lib/FBCE/Controller/Run.pm
==============================================================================
--- user/des/fbce/lib/FBCE/Controller/Run.pm Mon May 21 23:38:38 2012 (r235752)
+++ user/des/fbce/lib/FBCE/Controller/Run.pm Mon May 21 23:41:39 2012 (r235753)
@@ -33,7 +33,7 @@ sub register :Local :Args(0) {
# $c->authenticate();
my $user = $c->user->get_object();
- if ($c->stash->{'nominating'} != 0) {
+ if ($c->stash->{'nominating'} != 0 || !$user->active) {
$c->res->redirect($c->uri_for('/run'));
$c->detach();
}
@@ -64,7 +64,7 @@ sub edit :Local :Args(0) {
# $c->authenticate();
my $user = $c->user->get_object();
- if ($c->stash->{'nominating'} != 0) {
+ if ($c->stash->{'nominating'} != 0 || !$user->active) {
$c->res->redirect($c->uri_for('/run'));
$c->detach();
}
@@ -94,7 +94,7 @@ sub withdraw :Local :Args(0) {
# $c->authenticate();
my $user = $c->user->get_object();
- if ($c->stash->{'nominating'} != 0) {
+ if ($c->stash->{'nominating'} != 0 || !$user->active) {
$c->res->redirect($c->uri_for('/run'));
$c->detach();
}
Modified: user/des/fbce/lib/FBCE/Controller/Vote.pm
==============================================================================
--- user/des/fbce/lib/FBCE/Controller/Vote.pm Mon May 21 23:38:38 2012 (r235752)
+++ user/des/fbce/lib/FBCE/Controller/Vote.pm Mon May 21 23:41:39 2012 (r235753)
@@ -25,8 +25,8 @@ sub index :Path :Args(0) {
my $user = $c->user->get_object();
$c->stash(user => $user);
- if ($c->stash->{'phase'} != 0) {
- return;
+ if ($c->stash->{'voting'} != 0 || !$user->active) {
+ $c->detach();
}
my $p = $c->req->params;
if ($p->{cancel}) {
@@ -79,7 +79,7 @@ sub index :Path :Args(0) {
# $c->authenticate();
# my $user = $c->user->get_object();
-# if ($c->stash->{'phase'} != 0) {
+# if ($c->stash->{'voting'} != 0 || !$user->active) {
# $c->res->redirect($c->uri_for('/vote'));
# $c->detach();
# }
More information about the svn-src-user
mailing list