View Full Version : How to prevent one user to see other users' data using data source

08-02-2011, 02:48 AM

Please consider following case.

- I've BI server 3.7 CE stable version
- There is one table say 'UserInfo', having User information with user id as primary key.
- All user,existing in 'UserInfo' table have access to create Data Source
- Please provide steps so that one user can not see other users' data i.e. how can I use user id implicitly in Data Source so that user will be restricted to only his data.

-Thanks in advance,

08-03-2011, 01:08 AM
You will need to record the UserName when the record is created and this can be done using some code and recording it in the table along with the users record.

When the users want to view their records I use a form which uses the code to put the UserName in a hidden text box and then I use a sub form and query to filter the records to only show the records that user created.

To allow a supervisor to view all records I would create a different form with a query and subform that will show all records if the logged on user is a supervisor.

Security is very high using this method as you are using the network logon to verify the users identity. This assumes of course that you have prevented users from accessing the database window and design view.

For added security I also add a timestamp field to record the user and time of any changes