This topic is locked

Setting permissions when i register a new user..?

11/6/2008 07:17:33
PHPRunner General questions
S
stugutz author

Hiya

I have set up a db with 5 different tables and 5 users.

Each user has permissions to only view and edit etc 1 table only (this is so they dont see other tables from other users.)

I have admin rights to view/edit all tables and add new users... of course.
My question is....

When i add a new user how can i set this new user to only have permissions for only 1 table.?

As it stands when i add a new user they see everything.

I am referring to whilst the site is up and running not in application stage.
Hope i am making sense!
regards vjc

Sergey Kornilov admin 11/6/2008

You can assign required permissions to <Default> group. All users that don't belong to group will be assigned default permissions.

M
mattd1 11/6/2008

Or in the event to add a user, before adding, you can set the correct "user level" on the user table (you will know exactly "what field" tells you their level) value in code so on insertion the user's record is correct and not relying on default permissions

S
stugutz author 11/6/2008

You can assign required permissions to <Default> group. All users that don't belong to group will be assigned default permissions.


Ok then, what if I have 5 groups with each group set permissions to view their pages only...?

When I add a new user how will it know which group I want to add the user to?

On the register page it only shows username and password then creates the login. Once they login it shows automatically the default group which is all the permissions from all 5 groups. I don't want this I to add the user to 1 of the 5 groups.
thanks vjc

S
stugutz author 11/6/2008

Or in the event to add a user, before adding, you can set the correct "user level" on the user table (you will know exactly "what field" tells you their level) value in code so on insertion the user's record is correct and not relying on default permissions


thx m8

can you expand a little on this please .......a touch confused! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=34852&image=1&table=forumreplies' class='bbc_emoticon' alt=':unsure:' />

S
stugutz author 11/6/2008

Thats cool I worked it all out ...thanks heaps for your inputs.. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=34856&image=1&table=forumreplies' class='bbc_emoticon' alt=':P' />