I need to check what kind of role a user have depending on what page should be loaded.
A user should be able to create a "site" and set different roles on different users. I use the same kind of code to load the page on the different pages but give different approval what to show depending on what role they have. So my question are, what class should I extend with this code. I have already extended UserDetailsService to fit my database-design. But I have hard to find where role are check in runtime.
I have found something about Attributes but I can't see if that is run in runtime or only when you login. I have seen something about rolevote but haven't seen if that is what I should go for ether.
I hope this make sense and you can point me in some kind of direction.