This topic is locked

How do I selectively list data based on multiple user variables

10/9/2008 11:58:40 PM
PHPRunner General questions
J
JohnArtbox author

Hi

I need to create a user system with additional levels so that

users can only see there own data(easy as built in)

managers can see the data of any user assigned to them (ie having an

identical ManagerKey)

company admin can see the data of any user assigned to their company ie

having an identical Company Key

admin can see all data.

From the forum I think this can be done using an event on the list page

before the sql query that limits the display to appropriate variables. I

have very limited mysql and php knowledge to I was wondering what the

easiest solution is?

The data is separated into an

company table

manager table

user table

demoinstall table

notes

in a pyriamidal structure from top to bottom.

I also need to be able to add the CompanyKey, ManagerKey, UserKey, and DIKey

into the sub-tables automatically based on the user login ie when a user

creates a new DemoInstall the form should automatically have that user's

CompanyKey, ManagerKey, and UserKey added into the appropriately named

fields on the DemoInstall table.

Regards

John Henderson

Artbox Animation & Design

J
Jane 10/10/2008

John,
I recommend you to separate permissions for different type of users, create custom view for each group on the Datasource tables tab and set up User can see and edit their own records only security method on the Advanced security settings dialog on the Security tab.