I have a table with the following columns:
Phylum
Class
Order
Family
Species
Example 1: Let´s say I want to grant limited privileges to a user so he can change anything he wants in the ORDER Coleoptera, i.e., he can change any information in the FAMILY and SPECIES columns that correspond to the ORDER Coleoptera. He cannot change anything in Phylum or Class.
Example 2: I want to grant limited privileges to a user so that he can change anything he wants in the FAMILY mylitidae, i.e. he can change any information in the SPECIES column that corresponds to the FAMILY mylitidae. He, in turn, cannot change anything in Phylum, Class or Order.
That´s the general idea....Does anyone have any idea how I can do this?
Many thanks
Jim
column_priv ? restricting user privileges
Moderator: General Moderators
You could add a user table and then add foreign keys in the other tables pointing to the user table.
Then in your edit pages add if statements to handle the access.
If ORDER = Cleo AND USER = Jim
then edit
else
you don't have access to perform this function.
I assume you all ready have foreign keys built into the other tables tying them together. So when you want a user to change info in the species table you may have:
If SPECIES.id = ORDER.id AND USER = JIM
That might get you something to try any way...
Then in your edit pages add if statements to handle the access.
If ORDER = Cleo AND USER = Jim
then edit
else
you don't have access to perform this function.
I assume you all ready have foreign keys built into the other tables tying them together. So when you want a user to change info in the species table you may have:
If SPECIES.id = ORDER.id AND USER = JIM
That might get you something to try any way...