This topic is locked

Issue with permissions and DropDawnBox

6/23/2009 12:40:09 PM
PHPRunner General questions
F
fbrashich author

Hi...

i´m making a test with PHPRunner 5.0 Build 766
These are my tables:
USERS:

user - varchar(10)

pass - varchar(15)

ID - int(11) - autonumeric - primary KEY
Table values:

user | pass | ID

admin | 123456 | 1 --> Site admin, just for user and groups administration

control | 123456 | 2 --> Power User, who can see, edit all the data

federico | 123456 | 3 --> User 1

julieta | 123456 | 4 --> User 2
MCLNT: Clients

OwnerID - int(11)

ID - int(11) - autonumeric - primary KEY

client - varchar(30) - just a name
MPED: Sales Orders

OwnerID - int(11)

ID - int(11) - autonueric - primary KEY

ID_CLINT - int(11) - ID reference to MCLNT Table

product - varchar(30) - just a word
I setup the Security options like this:
On "user login setting" button i left all in blank

On "Advanced" button for table "MPED" i check the "Users can see and edit their own data only" option, using users.ID -> mped.OwnerID

On "Permissions" button choose "Dynamic Permissions"

I made the setup up of Groups and Rights for each User.
Well, now this is the problem.

The Clients registered in table MCLNT, are pointed to specified users, for example:
MCLNT table values:

OwnerID | ID | Name

3 | 1 | Company 1 --> Assigned to User1

4 | 2 | Company 2 --> Assigned to User2

3 | 3 | Company 3 --> Assigned to User1

4 | 4 | Company 4 --> Assigned to User2
After do that, in the ADD Page for Table MPED, i set the properties for a "DropDown Box" with the following data:
LookUp Table: MCLNT

Link ID : ID

Display Field : client

Check the "This DropDown is dependent on..." option with:

Category Control: OwnerID

Category Field : OwnerID
When i compile the project i get the following scennarios when i try to add an order:
1.- If i log in with User1 i can see the clients assigned to this user --> OK

2.- If i log in with User2 i can see the clients assigned to this user --> OK

3.- If i log in with Control to i can't see clients in the dropdown box --> WRONG
I'm doing lot of test with events, users rights and properties configurations and if i can see the clients in the dropdown box with the control user then the users don't see any more the client assigned to them.
How can i do to make a filter for this dropdown box, to:

Any user can see their assigned clients

Any Poweruser (control) can see any client.
Users and PowerUser must be able to ADD orders.
Any ideas on how i can do that?
Thanks in advance!!!

W
will 6/24/2009

If I understand it correctly, you "power user" has to be a member of a group that has "Admin Mode" ticked on the table where the "power user" needs access to all records. If "admin mode" is not ticked, a user will be limited to his/her "own" records only. So ...

  1. Add "power user" to his/her own group
  2. Give new group "Admin Mode" permission on relevant table(s)
    Hope this helps.

F
fbrashich author 6/24/2009

If I understand it correctly, you "power user" has to be a member of a group that has "Admin Mode" ticked on the table where the "power user" needs access to all records. If "admin mode" is not ticked, a user will be limited to his/her "own" records only. So ...


  1. Add "power user" to his/her own group
  2. Give new group "Admin Mode" permission on relevant table(s)
    Hope this helps.


This is already done...

on the list page i can see al data on tables, with admin and power user, and simple users can see only thier own data, but you are talking about the LIST PAGE.

i'm talking about ADD Page.
Thanks any way!!!

W
will 9/17/2009



This is already done...

on the list page i can see al data on tables, with admin and power user, and simple users can see only thier own data, but you are talking about the LIST PAGE.

i'm talking about ADD Page.
Thanks any way!!!


Hi Federico, it's a few of months later, and I'm not sure if you've found a solution already, but I think I might have answered your question unknowingly in a post I posted today (17/09/2009). I'm waiting for confirmation with regards to the $_SESSION["UserRights"] variable and if anyone has another/better suggestion. This works for me for now though. Hope it will help you too.