My question is about protecting data and creating a smart architecture for the following purpose. I have a LibraryBS class(there are a lot of such type classes) that gets data from the database. The LibraryBS class has GETALL() and GetById(int libraryId) functions. GETALL gets all libraries and GetById gets only one library from the database which's Id=libraryId. This is a web application that uses these classes. Now I want to add Company Protection. It means when the user logins the system and uses the LibraryBs.GetAll(), the user can see only the data that belongs the user's company. There are also specific users (let's call super user) when this type of user enters the system they can see all data.
What type patterns do you recommend?
Thank you!
Aucun commentaire:
Enregistrer un commentaire