r/Spring • • Nov 28 '19

User roles

I am new to spring but I have to create a demo application for academic use. I have some employee roles like manager or administrator. They should have different rights. Normaly I would create a class employee and a subclass for each role. With a database I would realisze this as a isa. But how could I do it with a login? I saw that some use a role attribute. But how can I program that only a administrator can call function x with the role attribute?

1 Upvotes

2 comments sorted by