Created
March 16, 2013 20:34
-
-
Save rubensworks/5178205 to your computer and use it in GitHub Desktop.
pseudocode van mijn visie
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
dashboardmapje = new HashMap<Type, Result>(); | |
dashboardmapje.put(indepentent, [de independent view] | |
dashboardmapje.put(admin, [de admin view] | |
public static Result dashboard(){ | |
User user = SomeMagicClass.getCurrentUser(); | |
if(user.getRoles().contains(Role.LOGIN)) { | |
return dashboardmapje.get(user.getType()) | |
} | |
else { | |
return FORBIDDEN; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment