This topic is locked
[SOLVED]

 Two Tier Access to User Records

1/6/2014 10:27:23 AM
PHPRunner General questions
C
CWDATA author

I am setting up access to my application using the security feature where logged on user can only see the records that apply to them. To do this I am using the inbuilt feature of "Users can see and edit their own data only"

However I would like a second tier of users that can see a specific sub-group of records as follows: -

  1. Basic user is a Manager of one location and can only see the records that apply to that location.
  2. As well as a Manager each location will have an Area Manager allocated to it.
  3. Each Area Manager may be responsible for say 5 locations.
  4. How can I set it up so that when the Area manager logs on he or she will see only the 5 Locations that apply to them.

    In other words I need a 2 tier version of the "Users can see and edit their own data only" method.
    Many thanks,

    Carl.

P
psenick 1/6/2014



I am setting up access to my application using the security feature where logged on user can only see the records that apply to them. To do this I am using the inbuilt feature of "Users can see and edit their own data only"

However I would like a second tier of users that can see a specific sub-group of records as follows: -

  1. Basic user is a Manager of one location and can only see the records that apply to that location.
  2. As well as a Manager each location will have an Area Manager allocated to it.
  3. Each Area Manager may be responsible for say 5 locations.
  4. How can I set it up so that when the Area manager logs on he or she will see only the 5 Locations that apply to them.

    In other words I need a 2 tier version of the "Users can see and edit their own data only" method.
    Many thanks,

    Carl.


Hi Carl,

You may want to take a look at this article: http://xlinesoft.com/articles/alumni.htm

It is how to build an alumni site but one group can only manage their group year and not others.
It may help.
Paul

HJB 1/6/2014

Looking at the issue under yet "untested" terms and in regard to the request to get a kind of "2nd tier" of "Users can see and edit their own entered data" it seems that there would be no other way out than to install "custom view page" (under TABLES section inside PHPRunner, right click under CUSTOM VIEW starts the page definition process) for each AREA manager and his e.g. 5 locations.
"QUERY" section inside PHPRunner shows a "FILTER" column where you would need to enter into a field for example best named here to be "area" like "= area 1" to finally get a SQL statement like:
SELECT *

FROM ALL-LOCATIONS

WHERE ( area 1 )
while on REGISTRATION process of the BASIC USER the field "area" should be as well be filled plus maybe an additional field like "location" to give the AREA manager some better orientation and would finally provide both under ONE CUSTOM VIEW PAGE, say, the "pretty good privacy" like under TIER 1 issue and to let AREA managers only be able to view what is due to them. To finally properly administrate the number of custom view pages, the DYNAMIC PERMISSIONS provide the necessary overview to allocate the right custom view page to the responsible AREA manager then. Possible other maybe more elegant solution to make ONE extra table with AREAS, LOCATIONS and AREA MANAGERS inside to then only make ONE custom view page for ALL AREA MANAGERS and to then implement a LOOKUP function to the registered users table at LOGIN process that way, an AUTO-FILL function is going to provide those very above mentioned "WHERE AS" SQL statement content.