Skip to content

Instantly share code, notes, and snippets.

@raphaelLacerda
Created November 17, 2014 17:06
Show Gist options
  • Save raphaelLacerda/f7539dbe3dd9cebfa290 to your computer and use it in GitHub Desktop.
Save raphaelLacerda/f7539dbe3dd9cebfa290 to your computer and use it in GitHub Desktop.
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