Limiting access to records via pools

I have an Airtable backend to a Softr app. The standard user table sync’d between the two works fine, keyed off the user’s email address.

My app has a table of people in the organisation, with a linked field between two records in the table which indicates which person is the manager of the other.

I want the people who are managers, perhaps 10% of the list of people, to be able to log-in and then only access their own staff. I can do that part, but then I also want HR staff to be able to access staff in their area. I could do that I think by adding a field “Assigned HR Person” to the person’s record and checking it against the logged in user. Where I get stuck is how I give more senior managers access to a broader range of people.

My instinct is to have Pools, where the pool has only a title, a linked list of users who can access the pool and a linked list of staff who are in the pool. In the People table there’d be the reverse, a “Member of these Pools” field and a “Has access to these Pools” field.

What I can’t work out is how I would actually apply that data structure in Softr to limit access to blocks.

Has anyone already worked out the method to control access in this broader way?

Thank you in advance for any pointers :slightly_smiling_face: