08-06-14, 11:39 #1Registered User
- Join Date
- Aug 2014
Unanswered: User Specific Data Access to a Set of Tables
I have a requirement in my project.
1.We have a set of Tables (12).
2. These tables are being used by various users.
3. Planning to create User Groups based on their role.
( Ex: GroupA having set of users, GroupB having set of users )
4.Here when a user logged into the server the entry details will be stored in all the above set of tables along with time.
So now the requirement is
1. When User 1 logged into the server the data will be inserted into all the above tables.
2. Similarly for User 2,.......User 100
3. When User 2 query the tables, he can able to see the User1 information as well. Similarly for all the users....
Example our Facebook, we can access only our data but not others.
In the same way here, the user should see only his data but not all the others data.
What would be the best approach to get this done Team.
Thanks & Regards,
08-06-14, 11:46 #2Jaded Developer
Provided Answers: 59
- Join Date
- Nov 2004
- out on a limb
have a table for data
a table for users
a table for user groups
an intersection table for users groups ie what users belong to which user groups
then depends on your business logic, store either the userid or the usergroup with the data
when it comes to extracting data, retrieve any usergroups that user is allowed to see. there is a lot to be said for storing the userid as part of the data as opposed to he usergroup so you know which user created the rowI'd rather be riding on the Tiger 800 or the Norton