Created
October 25, 2015 22:30
-
-
Save gregori/2ed6f42b8459d8a198ad to your computer and use it in GitHub Desktop.
Passo 3a
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 interface PessoaRepository extends JpaRepository<Pessoa, Long> { | |
@Override | |
@PreAuthorize("hasRole('ROLE_ADMIN')") | |
Page<Pessoa> findAll(Pageable pageable); | |
@Override | |
@PostAuthorize("returnObject.nome == principal.username or hasRole('ROLE_ADMIN')") | |
Pessoa findOne(Long aLong); | |
@PreAuthorize("hasRole('ROLE_ADMIN')") | |
List<Pessoa> findByNomeLike(@Param("nome") String nome); | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment