This topic is locked

Separate data for separate offices

5/6/2011 2:50:20 PM
PHPRunner General questions
D
dldobbins author

I am trying to use one set of code for multiple offices. I have an "office" field in the user file and an "office" field on each data table. When a user logs in they should only have access to their office's data. I can isolate the office-data by using Before SQL Query code, but that seems nearly unmanageable for many tables and reports. Also, the Edit pop-up box with Ajax shows all records in a table, not just those for a specific office. Again, I can add "where clauses" everywhere, but hard to maintain.
Is there not a high-level way to isolate all data based on the office-field for a logged-in-user?
Thanks.

Sergey Kornilov admin 5/6/2011

I suggest to check Advanced Security options. If you choose OfficeID as OwnerID you get exactly what you looking for.
More info:

http://xlinesoft.com/phprunner/docs/advanced_security_settings.htm

D
dldobbins author 5/6/2011



I suggest to check Advanced Security options. If you choose OfficeID as OwnerID you get exactly what you looking for.
More info:

http://xlinesoft.com/phprunner/docs/advanced_security_settings.htm


I tried that and I am unable to get it to work. All records are listed regardless of the user's "Office" value. I am using a varchar(10) for each table field. Don't think that would make a difference instead of an int ID field.
Am I correct that I need to set the relationship for each table relative to the Users table? No other query joins required?
http://fiacweb.org/downloads/Security_screen.pdf

Sergey Kornilov admin 5/7/2011

I guess something is not right with setup or with data in the database.
I recommend to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.