From 9bd8c465fd165196a28747e617180a8f1bb2fd19 Mon Sep 17 00:00:00 2001
From: Fabiano Sluzarski <fs09@inf.ufpr.br>
Date: Tue, 26 Feb 2013 13:01:41 -0300
Subject: [PATCH] esconder campos senha, campo obrigatorio nome em projeto e
 meus projetos pra cima no menu

---
 .../participatorio/web/ProjetoController.java |  2 +-
 .../spring/applicationContext-security.xml    |  3 +++
 src/main/webapp/WEB-INF/views/menu.jspx       | 22 ++++++++++++-------
 .../WEB-INF/views/projetoes/create.jspx       |  2 +-
 .../webapp/WEB-INF/views/projetoes/show.jspx  |  2 +-
 .../views/projetoes/showcandidatos.jspx       |  3 ++-
 .../WEB-INF/views/projetoes/update.jspx       |  2 +-
 .../webapp/WEB-INF/views/usuarios/list.jspx   |  2 +-
 .../webapp/WEB-INF/views/usuarios/show.jspx   |  2 +-
 9 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/src/main/java/br/ufpr/c3sl/participatorio/web/ProjetoController.java b/src/main/java/br/ufpr/c3sl/participatorio/web/ProjetoController.java
index 964801d..e390d01 100644
--- a/src/main/java/br/ufpr/c3sl/participatorio/web/ProjetoController.java
+++ b/src/main/java/br/ufpr/c3sl/participatorio/web/ProjetoController.java
@@ -67,7 +67,7 @@ public class ProjetoController {
         projeto.merge();
         return "redirect:/projetoes/" + encodeUrlPathSegment(projeto.getId().toString(), httpServletRequest);
     }
-
+    
     @RequestMapping(value = "/{id}", produces = "text/html")
     public String show(@PathVariable("id") Long id, Model uiModel) {
         Projeto projeto = Projeto.findProjeto(id);
diff --git a/src/main/resources/META-INF/spring/applicationContext-security.xml b/src/main/resources/META-INF/spring/applicationContext-security.xml
index 35ec6c9..5b6b27b 100644
--- a/src/main/resources/META-INF/spring/applicationContext-security.xml
+++ b/src/main/resources/META-INF/spring/applicationContext-security.xml
@@ -20,7 +20,10 @@
         <intercept-url pattern="/usuarios**" access="hasRole('Administrador')" />
         <intercept-url pattern="/usuarios**" access="hasRole('Administrador')" method="POST" />
         
+<!--         <intercept-url pattern="/projetoes/listEfetivos" access="permitAll" /> -->
+        
         <intercept-url pattern="/**" access="isAuthenticated()" />
+        
     </http>
     <!-- Configure Authentication mechanism -->
     <authentication-manager alias="authenticationManager">
diff --git a/src/main/webapp/WEB-INF/views/menu.jspx b/src/main/webapp/WEB-INF/views/menu.jspx
index d0011f2..c17af48 100644
--- a/src/main/webapp/WEB-INF/views/menu.jspx
+++ b/src/main/webapp/WEB-INF/views/menu.jspx
@@ -3,14 +3,20 @@
     <jsp:directive.page contentType="text/html;charset=UTF-8"/>
     <jsp:output omit-xml-declaration="yes"/>
     <menu:menu id="_menu" z="nZaf43BjUg1iM0v70HJVEsXDopc=">
-        <menu:category id="c_projeto" z="l9PWsmyhBz6vdxQqJihZDnWRr4o=">
-            <menu:item id="i_projeto_new" messageCode="global_menu_new" url="/projetoes?form" z="OY49hJ+taMk1k3ASiEFt4sGXCSU="/>
-            <!--             <menu:item id="i_projeto_list" messageCode="global_menu_list" url="/projetoes?page=1&amp;size=${empty param.size ? 10 : param.size}" z="x1vvsZFRYLoITzX2jIKG93Z4DWM="/> -->
-            <menu:item id="i_projeto_list" messageCode="global_menu_list_candidato" url="/projetoes/listCandidatos" z="user-managed"/>
-            <menu:item id="i_projeto_list" messageCode="global_menu_list_efetivo" url="/projetoes/listEfetivos" z="user-managed"/>
-            <menu:item id="i_projeto_list" messageCode="global_menu_list_rejeitado" url="/projetoes/listRejeitados" z="user-managed"/>
-            <menu:item id="i_projeto_list" messageCode="my_projects" url="/projetoes/meusprojetos" z="user-managed"/>
-        </menu:category>
+	    <menu:category id="c_projeto" z="l9PWsmyhBz6vdxQqJihZDnWRr4o=">
+	    	<sec:authorize ifAnyGranted="Administrador,Usuario">
+		            <menu:item id="i_projeto_new" messageCode="global_menu_new" url="/projetoes?form" z="OY49hJ+taMk1k3ASiEFt4sGXCSU="/>
+		            <!--             <menu:item id="i_projeto_list" messageCode="global_menu_list" url="/projetoes?page=1&amp;size=${empty param.size ? 10 : param.size}" z="x1vvsZFRYLoITzX2jIKG93Z4DWM="/> -->
+		            <menu:item id="i_projeto_list" messageCode="my_projects" url="/projetoes/meusprojetos" z="user-managed"/>
+		            <menu:item id="i_projeto_list" messageCode="global_menu_list_candidato" url="/projetoes/listCandidatos" z="user-managed"/>
+	        </sec:authorize>
+		            <menu:item id="i_projeto_list" messageCode="global_menu_list_efetivo" url="/projetoes/listEfetivos" z="user-managed"/>
+	        <sec:authorize ifAnyGranted="Administrador,Usuario">
+		            <menu:item id="i_projeto_list" messageCode="global_menu_list_rejeitado" url="/projetoes/listRejeitados" z="user-managed"/>
+	        </sec:authorize>
+	    </menu:category>
+        
+        
         <sec:authorize ifAnyGranted="Administrador">
             <menu:category id="c_ministerio" z="bdCebF8Z2eynkkyAMp/B5OZGV9A=">
                 <menu:item id="i_ministerio_new" messageCode="global_menu_new" url="/ministerios?form" z="6OpG3M2+Gvw8amn9aYg7/7zwAds="/>
diff --git a/src/main/webapp/WEB-INF/views/projetoes/create.jspx b/src/main/webapp/WEB-INF/views/projetoes/create.jspx
index f94b92f..50856cf 100644
--- a/src/main/webapp/WEB-INF/views/projetoes/create.jspx
+++ b/src/main/webapp/WEB-INF/views/projetoes/create.jspx
@@ -4,7 +4,7 @@
     <jsp:output omit-xml-declaration="yes"/>
     <form:create id="fc_br_ufpr_c3sl_participatorio_Projeto" modelAttribute="projeto" path="/projetoes" render="${empty dependencies}" z="uklzONF0yIPjbEJFSlLMffVUn7g=">
         <field:select field="pai" id="c_br_ufpr_c3sl_participatorio_Projeto_pai" itemValue="id" items="${projetoes}" path="/projetoes" z="JkbtdV8KzNjMFgvmaNi11XbZ+Ss="/>
-        <field:input field="nome" id="c_br_ufpr_c3sl_participatorio_Projeto_nome" z="5egNGMKHSYOQCuslpB7cYfsCJns="/>
+        <field:input field="nome" id="c_br_ufpr_c3sl_participatorio_Projeto_nome" required="true" z="user-managed"/>
         <field:select field="demanda" id="c_br_ufpr_c3sl_participatorio_Projeto_demanda" items="${tipodemandas}" multiple="true" path="tipodemandas" z="user-managed"/>
         <field:select field="acao" id="c_br_ufpr_c3sl_participatorio_Projeto_acao" items="${tipoacaos}" path="tipoacaos" z="TknEprFT06hffWHIizWjHzzhBB8="/>
         <field:input field="outroAcao" id="c_br_ufpr_c3sl_participatorio_Projeto_outroAcao" z="gKzGjxAdyPnPD7zoeTc+ZPLtejY="/>
diff --git a/src/main/webapp/WEB-INF/views/projetoes/show.jspx b/src/main/webapp/WEB-INF/views/projetoes/show.jspx
index 26a577f..eb0e5cb 100644
--- a/src/main/webapp/WEB-INF/views/projetoes/show.jspx
+++ b/src/main/webapp/WEB-INF/views/projetoes/show.jspx
@@ -43,6 +43,6 @@
         <field:display field="descLegislacao" id="s_br_ufpr_c3sl_participatorio_Projeto_descLegislacao" object="${projeto}" z="JL3fGOirqjzo/jfvrpOEsWfdtuE="/>
         <field:display field="obs" id="s_br_ufpr_c3sl_participatorio_Projeto_obs" object="${projeto}" z="+RB342ExVwf7Jpb2LEAVsNVT3tY="/>
         <field:display field="estado" id="s_br_ufpr_c3sl_participatorio_Projeto_estado" object="${projeto}" z="QQqAirebJjfsfFvZ2yTuji9gMYY="/>
-        <field:display field="usuario" id="s_br_ufpr_c3sl_participatorio_Projeto_usuario" object="${projeto}" z="zYLKtpIbUdPWnBZ97hES9bx740A="/>
+        <field:display field="usuario" id="s_br_ufpr_c3sl_participatorio_Projeto_usuario" object="${projeto}" render="false" z="user-managed"/>
     </page:show>
 </div>
diff --git a/src/main/webapp/WEB-INF/views/projetoes/showcandidatos.jspx b/src/main/webapp/WEB-INF/views/projetoes/showcandidatos.jspx
index 4284b31..1a8b285 100644
--- a/src/main/webapp/WEB-INF/views/projetoes/showcandidatos.jspx
+++ b/src/main/webapp/WEB-INF/views/projetoes/showcandidatos.jspx
@@ -6,7 +6,7 @@
     
 		<sec:authorize ifAnyGranted="Administrador">
 	    	<form action="" method="POST">
-	    		<button type="submit" name="status" value="1">Aceitar</button>
+	    		<button type="submit" name="status" value="1">Aprovar</button>
 	    		<button type="submit" name="status" value="0">Rejeitar</button>
 	    	</form>
     	</sec:authorize>
@@ -51,5 +51,6 @@
         <field:display field="descLegislacao" id="s_br_ufpr_c3sl_participatorio_Projeto_descLegislacao" object="${projeto}" z="JL3fGOirqjzo/jfvrpOEsWfdtuE="/>
         <field:display field="obs" id="s_br_ufpr_c3sl_participatorio_Projeto_obs" object="${projeto}" z="+RB342ExVwf7Jpb2LEAVsNVT3tY="/>
         <field:display field="estado" id="s_br_ufpr_c3sl_participatorio_Projeto_estado" object="${projeto}" z="QQqAirebJjfsfFvZ2yTuji9gMYY="/>
+        <field:display field="usuario" id="s_br_ufpr_c3sl_participatorio_Projeto_usuario" object="${projeto}" render="false" z="zYLKtpIbUdPWnBZ97hES9bx740A="/>
     </page:show>
 </div>
diff --git a/src/main/webapp/WEB-INF/views/projetoes/update.jspx b/src/main/webapp/WEB-INF/views/projetoes/update.jspx
index edebc77..9e3dbec 100644
--- a/src/main/webapp/WEB-INF/views/projetoes/update.jspx
+++ b/src/main/webapp/WEB-INF/views/projetoes/update.jspx
@@ -4,7 +4,7 @@
     <jsp:output omit-xml-declaration="yes"/>
     <form:update id="fu_br_ufpr_c3sl_participatorio_Projeto" modelAttribute="projeto" path="/projetoes" versionField="Version" z="5Ih+lV0KpGE1fSZecQ2VR8b5JFQ=">
         <field:select field="pai" id="c_br_ufpr_c3sl_participatorio_Projeto_pai" itemValue="id" items="${projetoes}" path="/projetoes" z="JkbtdV8KzNjMFgvmaNi11XbZ+Ss="/>
-        <field:input field="nome" id="c_br_ufpr_c3sl_participatorio_Projeto_nome" z="5egNGMKHSYOQCuslpB7cYfsCJns="/>
+        <field:input field="nome" id="c_br_ufpr_c3sl_participatorio_Projeto_nome" required="true" z="user-managed"/>
         <field:select field="demanda" id="c_br_ufpr_c3sl_participatorio_Projeto_demanda" items="${tipodemandas}" multiple="true" path="tipodemandas" z="user-managed"/>
         <field:select field="acao" id="c_br_ufpr_c3sl_participatorio_Projeto_acao" items="${tipoacaos}" path="tipoacaos" z="TknEprFT06hffWHIizWjHzzhBB8="/>
         <field:input field="outroAcao" id="c_br_ufpr_c3sl_participatorio_Projeto_outroAcao" z="gKzGjxAdyPnPD7zoeTc+ZPLtejY="/>
diff --git a/src/main/webapp/WEB-INF/views/usuarios/list.jspx b/src/main/webapp/WEB-INF/views/usuarios/list.jspx
index 66693d8..b477531 100644
--- a/src/main/webapp/WEB-INF/views/usuarios/list.jspx
+++ b/src/main/webapp/WEB-INF/views/usuarios/list.jspx
@@ -5,8 +5,8 @@
     <page:list id="pl_br_ufpr_c3sl_participatorio_Usuario" items="${usuarios}" z="D2zJN1tbtq6yOt5Ilht0ZRydPGM=">
         <table:table data="${usuarios}" id="l_br_ufpr_c3sl_participatorio_Usuario" path="/usuarios" z="4KD+DpfpaUKw7v7AuJ9hyTeAcY0=">
             <table:column id="c_br_ufpr_c3sl_participatorio_Usuario_login" property="login" z="nli22dEVByvw7Mj3QuOVxVp5ops="/>
-            <table:column id="c_br_ufpr_c3sl_participatorio_Usuario_senha" property="senha" z="t3P47C4C+YwrYf41WblfdxhJIDk="/>
             <table:column id="c_br_ufpr_c3sl_participatorio_Usuario_permissao" property="permissao" z="GkUqCQcQVBsO9oXhUiFN/UXgZnU="/>
+            <table:column id="c_br_ufpr_c3sl_participatorio_Usuario_senha" property="senha" render="false" z="t3P47C4C+YwrYf41WblfdxhJIDk="/>
         </table:table>
     </page:list>
 </div>
diff --git a/src/main/webapp/WEB-INF/views/usuarios/show.jspx b/src/main/webapp/WEB-INF/views/usuarios/show.jspx
index 08fbf2f..e36eb00 100644
--- a/src/main/webapp/WEB-INF/views/usuarios/show.jspx
+++ b/src/main/webapp/WEB-INF/views/usuarios/show.jspx
@@ -4,7 +4,7 @@
     <jsp:output omit-xml-declaration="yes"/>
     <page:show id="ps_br_ufpr_c3sl_participatorio_Usuario" object="${usuario}" path="/usuarios" z="hVyFuKMtqYOuT03sRS2kYIzmfBM=">
         <field:display field="login" id="s_br_ufpr_c3sl_participatorio_Usuario_login" object="${usuario}" z="shfMqjQUfy9cwpCM6eG2Xo+Ea1w="/>
-        <field:display field="senha" id="s_br_ufpr_c3sl_participatorio_Usuario_senha" object="${usuario}" z="VUUleHkm5eswAY8BtjA4RyFfFJE="/>
+        <field:display field="senha" id="s_br_ufpr_c3sl_participatorio_Usuario_senha" object="${usuario}" render="false" z="user-managed"/>
         <field:display field="permissao" id="s_br_ufpr_c3sl_participatorio_Usuario_permissao" object="${usuario}" z="+GcgehspNO+j1R4fkBQqOWfLDrg="/>
     </page:show>
 </div>
-- 
GitLab