Commit 6373f59f6f5ff2b5d5d7b9fe94af15fa14a98e4e
Exists in
master
Merge branch 'master' into 2.4.0
Conflicts: README documentation/reference/pt-BR/security.xml
Showing
2 changed files
with
5 additions
and
8 deletions
Show diff stats
documentation/reference/pt-BR/security.xml
... | ... | @@ -20,8 +20,7 @@ |
20 | 20 | <title>Configurando</title> |
21 | 21 | |
22 | 22 | <para> |
23 | - Para um correto funcionamento da segurança no Framework Demoiselle é necessário inserir os interceptadores de segurança no arquivo <filename>beans.xml</filename>, localizado | |
24 | - na pasta WEB-INF em projetos WEB ou na pasta META-INF em projetos SE ou EJB. | |
23 | + Para um correto funcionamento do Demoiselle é necessário inserir os interceptadores de segurança no arquivo <filename>src/main/webapp/WEB-INF/beans.xml</filename>. | |
25 | 24 | </para> |
26 | 25 | |
27 | 26 | <programlisting role="XML"><![CDATA[<beans xmlns="http://java.sun.com/xml/ns/javaee" |
... | ... | @@ -239,7 +238,6 @@ class GerenciadorBookmark { |
239 | 238 | } |
240 | 239 | |
241 | 240 | }]]></programlisting> |
242 | - | |
243 | 241 | <tip> |
244 | 242 | É possível informar mais de um papel para a anotação <code>@RequiredRole</code>, neste caso basta que o usuário |
245 | 243 | autenticado possua um dos papéis listados para ter acesso ao recurso. |
... | ... | @@ -535,8 +533,8 @@ class GerenciadorBookmark { |
535 | 533 | } |
536 | 534 | |
537 | 535 | @Override |
538 | - public boolean hasPermission(Object resource, String operation) { | |
539 | - // Verifique se o usuario autenticado tem a permissao adequada, retorne true em caso positivo | |
536 | + public boolean hasPermission(String resource, String operation) { | |
537 | + // Escreva aqui seu codigo de verificação de permissao | |
540 | 538 | return false; |
541 | 539 | } |
542 | 540 | }]]></programlisting> |
... | ... | @@ -612,5 +610,4 @@ class GerenciadorBookmark { |
612 | 610 | </tgroup> |
613 | 611 | </informaltable> |
614 | 612 | </section> |
615 | - | |
616 | -</chapter> | |
617 | 613 | \ No newline at end of file |
614 | +</chapter> | ... | ... |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/ParameterImpl.java
... | ... | @@ -82,7 +82,7 @@ public class ParameterImpl<T extends Serializable> implements Parameter<T>, Seri |
82 | 82 | } |
83 | 83 | |
84 | 84 | private HttpServletRequest getRequest() { |
85 | - return Beans.getReference(HttpServletRequest.class); | |
85 | + return (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest(); | |
86 | 86 | } |
87 | 87 | |
88 | 88 | @Inject | ... | ... |