dimanche 22 février 2015

Clarification for Use of ?. operator

How does the Use of ?. operator in principal id help in security? or How are the below two lines different?



@PostAuthorize("hasRole('ROLE_SUPERVISOR') or ( isAuthenticated() and returnObject.employee.id == principal.id )")

@PostAuthorize("hasRole('ROLE_SUPERVISOR') or returnObject.employee.id == principal?.id")

Aucun commentaire:

Enregistrer un commentaire