swatisonee Posted April 1, 2007 Share Posted April 1, 2007 Hi, I have a table called Reports . These are reports of different users . Now if 2 users attend a meeting, they each make separate reports which get stored. When a third user attends another meeting on the same subject, he creates a third record. I have been fiddling around with ways of updating records such that a single report can be updated by all 3 users. But it results in even a 4th user being able to view the report (if not update) and i just dont know how i can limit this. The issue here is that a situation can arise when the 4th user may need to read the report but until the time he needs to, i dont wish to allow access to that report. Heres my code till now. Link to comment https://forums.phpfreaks.com/topic/45148-restricting-access-to-a-records-contents/ Share on other sites More sharing options...
Barand Posted April 1, 2007 Share Posted April 1, 2007 You could use third table, reportaccess, and if a user has an entry in the table for that report he can access it [pre] report reportaccess user ------- -------------- ------- report_id <-+ user_id ----> user_id rpt_date +-- report_id name title readonly [/pre] Link to comment https://forums.phpfreaks.com/topic/45148-restricting-access-to-a-records-contents/#findComment-219424 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.