Jump to content
  • 0

Multiple Criteria for Record Level Security?


rocketlaunchapps
 Share

Question

Hello,

I would like to create a DATA PAGE that only gives access to SALES MANAGERS to then view a list of customers created by 1) himself and 2) by users within his team.  I do not want SALES MANAGER "A" to be able to see SALES MANAGER "B" listings.  There will be a team of 5 people assigned to Manager "A" and a team of 10 people assigned to MANAGER "B".  

1. If MANAGER "A" logs in, I want him to see his customers as well as ALL of his teams customers. 

2. If a user logs in, then I want him to see only his customers (nobody else from the team)

Is this possible with RLS?  How do I accomplish this?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
11 hours ago, rocketlaunchapps said:

Hello,

I would like to create a DATA PAGE that only gives access to SALES MANAGERS to then view a list of customers created by 1) himself and 2) by users within his team.  I do not want SALES MANAGER "A" to be able to see SALES MANAGER "B" listings.  There will be a team of 5 people assigned to Manager "A" and a team of 10 people assigned to MANAGER "B".  

1. If MANAGER "A" logs in, I want him to see his customers as well as ALL of his teams customers. 

2. If a user logs in, then I want him to see only his customers (nobody else from the team)

Is this possible with RLS?  How do I accomplish this?

Hi,

Yes, it's possible, however you would need to create two separate datapages one for managers and another for team members.

I suppose that you store team member ID (user ID) and team label (team A or team B )for each team member in the table which stores information about the user.  Also I suppose that you stamp team member ID for each customer to identify who is assigned to the customer.

 Since those tables are related, I would recommend joining two tables in a view, use that view as a data source for report. For manager you need to set RLS settings to compare team label in the authentication datasource to the team label in the datasource view, so manager will see all the records, related only to his team. For team member you need to compare team member ID in the data source to team member ID in authentication, this way each team member will see only records, assigned to him.

Hope that helps. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...