Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2012 23:41:39 +0000 (UTC)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r235753 - user/des/fbce/lib/FBCE/Controller
Message-ID:  <201205212341.q4LNfdZT078379@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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();
 #     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205212341.q4LNfdZT078379>