Jump to content

Restricting access to a records contents


swatisonee

Recommended Posts

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

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]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.