This topic is locked
[SOLVED]

 Setting Security for Two tables

4/28/2010 11:43:58 PM
PHPRunner General questions
P
procheck author

Here's one which I thought that I had previously solved.
I have a USER table as follows and AccessID is setup in the

User Group Permissions. (The dots are for spacing & not in the tables)
PoolID..... AccessID .. UserName .. Password

pool1 ..... admin ..... admin ..... test

pool2 ..... admin2 .... admin2 .... test2

pool1 ..... pool1 ..... user1 ..... pass1

pool1 ..... pool1 ..... user2 ..... pass2

pool2 ..... pool2 ..... user3 ..... pass3

pool2 ..... pool2 ..... user4 ..... pass4
And a Customer table. There can only be one admin per pool
AccessID.. Name ..PoolID

admin .... John ..pool1

admin2 ... Fred ..pool2

admin3 ... Sue .. pool3

admin4 ... Tom .. pool4

  1. There should only be one admin Customer displayed and this can

    only be viewed by the admin who is logged in. Users can never

    see the customer list.
  2. The admin should be able to see & edit all users in the USER Table

    for his pool only(ie - pool1). Users can only see & edit their data.
    Using the Advanced Security Settings, I haven't been able to get #2 working.

    I think that I could get it to work by setting
    "Users can see other users data, can edit their own data only"
    and using a code snippet to only show data based on who is logged in

    but before I proceed, I was wondering if this is the way to do it

    in PHP Runner?
    Thanks again
    Al

Sergey Kornilov admin 4/29/2010

Wasn't able to decipher it fully.My suggestion is to implement it according to your understanding and if there are any specific issues - you can post it here.

P
procheck author 4/30/2010

Hi Sergey,
I've put the demo at this link:
http://www.prochecksports.com/phprunner/login.php
If you sign on with user1/pass1 and click on "Member Information", this info is correct.

The user sees his own data. The same with user2/pass2.
Now sign on with admin/test and click on "Customer Information". The person who signs up

is also the admin for the pool. This is correct.
Now click on "Member Information". I want this to display.
PoolID..... AccessID .. UserName .. Password

pool1 ..... admin ..... admin ..... test

pool1 ..... pool1 ..... user1 ..... pass1

pool1 ..... pool1 ..... user2 ..... pass2
How can I do this?
Thanks for your patience
Al

P
procheck author 5/4/2010



Hi Sergey,
I've put the demo at this link:
http://www.prochecksports.com/phprunner/login.php
If you sign on with user1/pass1 and click on "Member Information", this info is correct.

The user sees his own data. The same with user2/pass2.
Now sign on with admin/test and click on "Customer Information". The person who signs up

is also the admin for the pool. This is correct.
Now click on "Member Information". I want this to display.
PoolID..... AccessID .. UserName .. Password

pool1 ..... admin ..... admin ..... test

pool1 ..... pool1 ..... user1 ..... pass1

pool1 ..... pool1 ..... user2 ..... pass2
How can I do this?
Thanks for your patience
Al


Hi Sergey,
I was just wondering if you had a chance to review my example?
Thanks

A
ann 5/5/2010

Al,
To create this security scheme add Custom view of the Customer table(say Copy of Customer table) on the Datasource tables tab. Then assign different permissions for main table and this view: choose PoolID as OwnerID for admins, Username as OwnerID for users on the Advanced security settings dialog on the Security tab. Then set up permissions for these pages on the User group permissions dialog: assign rights for admins to Customer table and for users to "Copy of Customer table".

P
procheck author 5/5/2010



Al,
To create this security scheme add Custom view of the Customer table(say Copy of Customer table) on the Datasource tables tab. Then assign different permissions for main table and this view: choose PoolID as OwnerID for admins, Username as OwnerID for users on the Advanced security settings dialog on the Security tab. Then set up permissions for these pages on the User group permissions dialog: assign rights for admins to Customer table and for users to "Copy of Customer table".


Hi Ann,
I did what you said but with the member(Copy of Member) table instead of the customer table.

It now works. Thanks very much for your help!
Al