This topic is locked

Departmental Rights

2/6/2013 11:23:14 AM
PHPRunner General questions
R
rlee6087 author

Ok, here is my question, say I have an application that i want 3 different departments to use. Accounting, IT, and HR. I want the users in It to only see records for the IT folks, same for HR and accounting. I do not want accounting people to see HR's data, nor IT folks to see it either, or HR to see accounting and It and so on. Is there a way to accomplish this? I'm using PHPRunner 6.2 and Mysql DB

C
chuckbower 2/7/2013

Here is some example code you could use on your Before SQL Query events (on List, Edit, View, etc. pages):
$strWhereClause =

whereAdd($strWhereClause ,"(EmployeesUsers.eusupviid = '" . $_SESSION["euiid"] . "'

OR EmployeesUsers.eualtsupviid = '" . $_SESSION["euiid"] . "' ) ");
In this example, I am limiting the capability to edit an employee row to either his main supervisor, or alternate supervisor.
Chuck