Access rules for public link

Dear all,

I love Grist but I am stuck with something which should be easy. I have activated Public access on my Grist database with public access role as Viewer. However, I want to edit the rule and create an exception for a table where anonymous users should have full rights.

It looks like this:

However, it does not work as expected. When I open the link as an anonymous user, I cannot edit the table. Also, when I “view as Anonymous” I see no table, and when I “view as Viewer” I can edit all tables.

What did I get wrong? Thank you in advance for your help.

Hi Antoine!

Apologies for the delay in getting an answer to you!

With Viewer access, it is always read-only, regardless of access rules. You will need to give the public EDITOR access then modify access rules to restrict access to the document.

In order to immediately restrict access, we can add a default rule to restrict EDITOR access within the document. To add a new condition, click the + icon next to the top condition. In the new line, enter the following;

user.Access == EDITOR

Restrict all permissions.

You’ll also want to remove structural permissions from EDITORs. Uncheck the box for the first rule under ‘Special Rules’.

Next, grant access to the table you want publicly editable.

Now, if you have users on the document who should have EDITOR access and be able to access other tables, you can create a table of users with email addresses.

Then, we can grant more access for these specific users.

Create a user attribute that compares the logged in user’s email address to the values in the Email column for records in the Users table.

Then, modify your default rule that restricts EDITOR access to specifically restrict anyone not listed in that table. The updated condition should read as

user.Access == EDITOR and not user.User.Email

So, if someone is accessing this document as EDITOR but they are not listed in that User table via email, then they’ll be restricted from all tables by default.

If someone is accessing the document logged in with an email in the list and with EDITOR, they’ll have full access to the document by default.

Please let me know if you have any follow up questions!

Thanks,
Natalie

1 Like

Thank you very much, I had not looked at it this way but it makes perfect sense!