Created
February 17, 2015 20:53
-
-
Save oliverfernandez/c56f833d058fcae53a1b to your computer and use it in GitHub Desktop.
A proposal implementation
This file contains hidden or 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 boolean hasPermission(UserDetails userDetails, Object target, Object permission) { | |
RunAsUserToken asUserToken = new RunAsUserToken( | |
"key", | |
userDetails, | |
userDetails.getPassword(), | |
userDetails.getAuthorities(), | |
authentication.getClass()); | |
return permissionEvaluator.hasPermission(asUserToken, target, permission); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment