Created
October 30, 2011 20:36
-
-
Save runeflobakk/1326397 to your computer and use it in GitHub Desktop.
Vi har en eller flere støttede ConfigAttributes, og sjekker om det finnes en som aksepterer sikkerhetsnivået til principalen.
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
Object p = authentication.getPrincipal(); | |
if (p instanceof MyPrincipal | |
&& exists(supportedAttributes, new AcceptingSecurityLevelOf((MyPrincipal) p))) { | |
return ACCESS_GRANTED; | |
} else { | |
return ACCESS_DENIED; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment