I have a table with rows that includes usernames. I have two users who will view the table and I want to filter the table to show specific usernames based on who the session_user is. Is this possible?
Sample Data
Username|
---------
1 |
2 |
3 |
4 |
5 |
6 |
If session_user() = 'A', table should only show
Username|
---
1|
2|
3|
If session_user() = 'B', table should only show
Username|
---
4|
5|
6|
Additional condition: Aside from the 2 viewers, all usernames will be added as viewer but will be filtered as well only for their own data.
So basically, if the viewer is one of the usernames then it will only show their own data but if it is one of the managers, table will show usernames that's been assigned to them.