This topic is locked

User Access Control

1/5/2007 1:16:19 PM
PHPRunner General questions
S
steviechan83 author

Hi,
For the login, if i set it to the "users can see and edit their own data only" and I have 3 tables
Is it possible to have different ownerID for the user table?
I noticed that the ownerID is the same for the user table while the ownerID for the main table can change.
Does this have to be changed manually? I tried changing it in the login file but it didn't work
$_SESSION["OwnerID"] = $data["type1"];

$_SESSION["OwnerID2"] = $data["type2"];
Thanks
Stephen

Sergey Kornilov admin 1/7/2007

This behaviour is by design.
OwnerID in users table is usually a primary key. You cannot have more than one primary key. The idea of owner id is to identify what user it belongs to.
Why do you need to have more than one OwnerID field in Users table?

S
steviechan83 author 1/8/2007

This behaviour is by design.

OwnerID in users table is usually a primary key. You cannot have more than one primary key. The idea of owner id is to identify what user it belongs to.
Why do you need to have more than one OwnerID field in Users table?


Actually I don't need another OwnerID field in the user table but I cannot match the ownerID with the primary key of another table.
For example:
User table
jobid, username, password: 9, joe1, password
Main Table

ID, item name, item description: 9, coffee mug, stainless steel mug with adjustable handle
What I would like to do is match the jobid and ID. However, the drop down box in the 'advanced security settings' does not let me see it. So do i need to change this manually?
Is this because the jobid is not a primary key and ID is a primary key?
Thanks

J
Jane 1/9/2007

Stevie,
PHPRunner doesn't allow using primary key as OwnerID in the Main table because in this case Use can see ad edit their own records only option doesn't work properly.

I recommend you to create new field in the Main table, for example UserID, and use this field as OwnerID.