Is there an alternative to record level security in this case?

We have document notes of type “Billing” that we want to block from 90% of the users. Using RLS is what I was thinking, but that means we have to setup an RLS entry for each and every user group.

Any good ideas on how to block the display of this specific type of note? I’m trying to figure out the right way to do it through code, not just hard coding it.

RLS is the only way - for doing this without any modification - though the complexity lies in the creation of user groups.

I was thinking of doing a modification, but I want it to be “correct”. How would you go about doing it?

I don’t want to hardcode, “if (docuRef.type == ‘restricted’)” or something.

This can be done in several ways…

If it is more customer specific use a macro instead of hard coding.

or creating a new table - for storing restricted document types and form a relation with the users table.

or creating a new table - for storing restricted users and form relation with table, which holds the document types

or creating a new table - for storing both user id and document types…