Change way to handle error release20120203
authorhiro
Thu, 16 Feb 2012 15:07:58 +0800
branchrelease20120203
changeset 169 b6d8bef0f857
parent 164 2bde5449e154
child 172 ad79f89f5e8c
Change way to handle error
src/Org/W3/Cg/Pub/SpecBundle/Controller/DefaultController.php
src/Org/W3/Cg/Pub/SpecBundle/Resources/views/Error/error_general.html.twig
--- a/src/Org/W3/Cg/Pub/SpecBundle/Controller/DefaultController.php	Mon Feb 06 07:58:16 2012 -0800
+++ b/src/Org/W3/Cg/Pub/SpecBundle/Controller/DefaultController.php	Thu Feb 16 15:07:58 2012 +0800
@@ -334,7 +334,10 @@
         //Only chair can add Specs
         if (!($gr_obj->isChair($this->getLogin())))
         {
-            return $this->render('OrgW3CgPubSpecBundle:Default:404.html.twig', array());
+            return $this->render('OrgW3CgPubSpecBundle:Error:error_general.html.twig', array('error'=>
+            		array('header'=>"Not Authorized",
+            			  'message'=>"You're not authorized to publish specifications. Only a chair can publish specs.")
+            		));
         }
         
         // Build form
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Org/W3/Cg/Pub/SpecBundle/Resources/views/Error/error_general.html.twig	Thu Feb 16 15:07:58 2012 +0800
@@ -0,0 +1,1 @@
+/afs/w3.org/pub/WWW/community/src/templates/twig/cg-pubreg/spec/Error/error_general.html.twig
\ No newline at end of file