This topic is locked

setting user permissions

1/12/2012 7:56:12 PM
PHPRunner General questions
author

I am using dynamic permissions. and ver 6 phprunner.
I want to be able to set the user permissions to delete or copy a record dependant on the record. in other words user1 can view record1 and record2 but not record3. (I already have this set up using the adv security settings.)
but user1 can delete record1 but not record2 because they are the owner of record1. and I would like that to happen without me having to go into dynamic permissions and change the user level for each user as I add them.
Is there a tutorial or explanation somewhere about setting up permissions when you add a user so that I can make them a certain level say manager without me having to go into dynamic permissions?
Thanks

Patti

7542 1/12/2012

Ok
I assume that when you add users you have multiple user groups.
I would do one of two things that I have done in the past. Have a drop down box that states admin, sales etc (if you need to change the permissions), as you may let default users register but add higher level users. Anyway after you add the users run an event to update the security table. The table with the user groups is normally called ...ugmembers. You need to update the GroupID. You will see all the user groups in ...uggroups.
so if your want to add some one by default to the admin group update ugmembers GroupID to -1
Hope that helps
Regards
Richard

500507 1/13/2012

Thanks for the ideas

I could have sworn that I saw a tutorial or read somewhere that you can set the permission level in an event when you add the user

7542 1/13/2012

You can just as I explained. All you need need to do is run an update event. If you use data assess layer just param the user and change the GroupID. i.e
[color=#0000FF]$tblUsers = $dal->Table("bcc_ugmembers");
[color=#0000FF]$tblUsers->Value["GroupID"]="3";
[color=#0000FF]

7542 1/13/2012

Your set up user groups are in bcc_uggroups