Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pseudocode van mijn visie
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
You can’t perform that action at this time.