Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/marcialrosales/error-view-without-principal
- Owner: MarcialRosales
- Created: 2016-02-09T20:06:50.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-09T20:58:29.000Z (almost 9 years ago)
- Last Synced: 2023-03-03T07:53:47.703Z (over 1 year ago)
- Language: Java
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.