So, like most examples in the Access Rules, I have a USERS table, with common name and email for users.
I would like SOME of those users to be auditors (that can change depending of semester). And auditors should have access to some tables that right now, few people have access.
My first thought was to add a column “Auditor” of the type Boolean to the Users table.
But I am at a loss on how to use that new column on the User Attributes of the Permissions Panel.
these are the rules being used right now for the table
user.Access != OWNER and user.Membros.id != rec.Responsavel and user.Membros.email != "email@example.com" and user.Membros.email != "firstname.lastname@example.org"
As I understand, there are inherent user atributes that come from the system. And what we are doing in the rule above is telling GRist to check user attribute “membros”, column email and get from that if it’s the user.Email (which is stored in the system)
My only guess on how to make this work with the Auditor rule is to create a new column in the Usuários table, where IF Auditor = yes, then it repeats the email. from the email column.
And thus I get the user attribute searching for that “second” email column, which only have anything if the user is an auditor…
Is there a SIMPLER WAY? Maybe I am going for the most complicated way?
PS: I realized that even creating the extra column in the Usuários table and repeating the email if the column Auditor is yes…
and creating the User Attribute “Auditores” in the Access Rules, searching for attribute user.Email, using the Usuários table and column “emailauditores”…
… that I still don´t know how to set the table rules to allow the auditors to see stuff lol