This topic is locked
[SOLVED]

 Dynamic Permissions or Dynamic SQL Query

11/12/2013 8:10:06 AM
PHPRunner General questions
D
DUKE author

Hi Guys,
I have a tricky permissions problem.
We have two tables: Clients and Employees.
In the employee table we store the employee's basic details. (Master Table)

In a detail table, we store the names of clients that employee deals with. (One employee can work for multiple clients)

In detail table we store a bunch of documents uploaded by the employee. Each document is uploaded for a specific client.
When the client logs in on the system, he must only see the employees working for him.

when the client accesses the document library of a specific employee, he must only see the documents uploaded for him.
My guess is I will have to store the client's name\useid in the database, but I am not sure how to do the actual filtering process....


I think a dynamic SQL query will work, but can this be done since the list of clients (according to which I want to filter the records) is stored in a detail table?