Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/marcialrosales/error-view-without-principal

We would like to include the current user's name in the error template view. If the user is not logged in, we may want to include a link to login or nothing. But it turns out the error view has no access to the Spring Authentication object of the current user.
https://github.com/marcialrosales/error-view-without-principal

Last synced: about 21 hours ago
JSON representation

We would like to include the current user's name in the error template view. If the user is not logged in, we may want to include a link to login or nothing. But it turns out the error view has no access to the Spring Authentication object of the current user.

Awesome Lists containing this project

README

        

# Error View has no access to Authentication object

We would like to include the current user's name in the error template view. If the user is not logged in, we may want to include a link to login or nothing. But it turns out the error view has no access to the Spring Authentication object of the current user.

Steps to reproduce the issue:


  • Execute test case ErrorViewWithoutPrincipalApplicationTests: 2 test cases will pass and 1 will fail because it cannot find the logged in user who is authenticated but has no the required role.