AlanChu

Privilege Problem: View the records by login name and group in a large database

Discussion created by AlanChu on Nov 12, 2012
Latest reply on Jun 16, 2013 by disabled_jackrodgers

I'm working with a project for different group of people to view the records by privilege.

 

Here are the details:

 

Database Structure

TO: User

Fields:

UserLogin; #Note: using the OD name

UserID;

Group;

 

Sample Data:

 

UserLoginUserID
Group
AaronManagerAA
BrendaManagerBB
OliverStaff01A
EvaStaff02B
OscarStaff03A
EstherStaff04B

 

 

TO: DataFile

Fields:

Viewable User

Contents

 

Sample Data:

 

Viewable UserContents
ManagerB/Staff02Brenda order; Eva follow
Staff04/Staff02Esther request; Eva reply
Staff03/Staff01Oscar do one; Oliver do the other
ManagerAAaron do all
Staff03Oscar do his own
Staff04Esther do her own

 

 

Privilege Set:

Full Access; #Only the Admin can access all records

Manager; #The managers can access their own group. ie. all the records with "Viewable User" of "DataFile" belongs to the "Group"

Own; #The user can access their own records when field "UserID" exists in the field "Viewable User"

 

I put Brenda and Aaron into the privilege set "Manager" and the others into "Own"

 

I would like to do the followings:

  1. When the member of "Manager" login, he/she can view all the records of "DataFile" belongs to their own group only;
  2. When the member of "Own" login, he/she can view only the records of "DataFile" which the "Viewable User" contains his/her UserID;
  3. Avoid the "<no access>" records being displayed by using faster method to show the records (around 200,000), instead using the perform find(field,"*") which I tried.

 

Does anyone can help me to solve this problem?

 

Thanks in advance!

Outcomes