This topic is locked

Master Detail Problem with Resricted Access

4/10/2009 11:40:21 PM
PHPRunner General questions
V
vickiwatson author

I'd appreciate any help. I'm a new user of PHPRunner.
I have a database with a family table and a children table, related on family_number.
Username and passwords are stored in the family table and I'm trying to use that to restrict access to allow the logged in family to edit only their family record and only their children records, but to be able to view all records.
The master/detail is working correctly, displaying the correct children for each family.
When I had Advanced security options set to "See other user's data, can edit their own data only" it worked correctly on the family (master) level, but allowed me to edit any children (detail) records.
Then I set up 2 separate projects - one which allowed only viewing of all records by anyone on login. Of course that worked fine. I had a 2nd project that I wanted to use to allow members to edit only their family/children records, so set Advanced security to "Users can see and edit their own data only". That project correctly pulls up only their own family/children records, but has no edit links at all.
I'd prefer to do this in one project, but the 2 project approach is better than nothing. I can't get either to work.
Is it okay to have the login info in the family table or should that be in a separate login table? I broke it out and tried it in a separate table and it didn't seem to make any difference.

V
vickiwatson author 4/11/2009

Okay, I deleted the project with the edit only one family approach and re-created it and it is working now. I can log in and it only shows me the family record of the logged in user and allows editing that and the child records for that family.
I'd still like to know what I was doing wrong in trying to do it all in one - i.e. viewing any records but editing only the logged in user's family and children records. The child records were the problem, allowing me to edit any rather than restricting it.

J
Jane 4/13/2009

Hi,
please make sure you've set up See other user's data, can edit their own data only security method for both master and detail tables.