Created
November 17, 2014 17:06
-
-
Save raphaelLacerda/f7539dbe3dd9cebfa290 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AutorizadorCritico { | |
@Secures | |
@Critico | |
public boolean conferirPerfil(InvocationContext invocationContext, BeanManager manager, | |
UsuarioLogado usuarioLogado) throws Exception { | |
return usuarioLogado.isAdministrador()? true : false; | |
} | |
} | |
@Produces | |
@Critico | |
@Named("fornecedores") | |
public List<Fornecedor> listaFornecedores() { | |
return todosFornecedores.listar(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment