This topic is locked

user group permissions

10/18/2007 1:48:23 PM
PHPRunner General questions
A
alex82 author

hi,

i have this problem,

i have a table users:

user id

group

username

password
2 groups:

user and admin
another table:

transactions:

tran ID

user id

amount
the admin group has permissions to add new fields at users and transactions table

the problem is that every time an user that is admin is logged and

tries to add a new field to the table users the user id number is always the user id(that is from admin group) is loggen in and i always have a duplicate key entry

if i change the value of the field user id when i want to add a new user it doesn´t matter what i fill it stores the user id is loggen in,

when an user that is admin tries to add a new transactions the user id is always the same too

Sergey Kornilov admin 10/18/2007

It looks like you setting advanced security settings improperly.

What advanced security mode do you use for each table?

A
alex82 author 10/18/2007

users can read and edit their own data only,

tables:

users:

user id

group

username

password
users table owner id field i selected userd id(users table)

main table owner id field i selected userd id
table:

transactions:

tran ID

user id

amount
users table owner id field i selected userd id(users table)

main table owner id field i selected userd id
and i have created an admin user
and then at user group permissions
i have 2 groups user and admin,

user group just can see some info

and admin the admin user selected can do everything

Sergey Kornilov admin 10/18/2007

If you use users can read and edit their own data only mode on Users table you need to allow users register themself.
If you like admin to add new uses create a view for Users table and don't set users can read and edit their own data only mode for this view.