I have a set of actions in a database, such as Add User, Edit User, Import Users, Send Invitation, etc. I have attached these permissions to roles. Then I attached these roles to users.
Is there a good pattern or API I can create for using this? I do not want to put a bunch of if/else statements in the code to check for permissions. So maybe interfaces would be good? Sorry for being so vague, I just do not know where to start and looking for advise on how to start this (perhaps an authorization rule provider?). Thanks in advance for any help.