A lead table, with assignments#
Access rules let you control how a shared document is used, and maintain a separation of roles and responsibilities. In this example, we suppose an entrepeneur is using Grist as an ad-hoc lead tracker for sales and potential advisors:
Our entrepeneur wants to delegate sales leads to a small team of freelancers, and keep potential advisors private. They want to be able to assign someone to follow-up a lead just by writing their initials in an “Assignment” column, and not allow anyone else to change that assignment. Here are the rules they come up with, which you can see yourself by visiting the example:
There are three blocks of rules. First, the rule for the Advisors table:
- This restricts all access to the Advisors table to the owner. We assume the document is owned by the entrepeneur, and shared with anyone else as an editor.
Next, there are rules for the Leads table:
- We allow only the owner to update anything in the Name or Assignment column.
- We forbid anyone other than the owner from deleting a row of the Leads table.
Then there are default rules, not specific to any table:
- We forbid anyone other than the owner from modifying the document’s structure.
- The remaining rules here are just the default behavior of any document.
There are also two special check-box rules, that would typically be turned off. They give special permission to view access rules and copy this document even if one normally wouldn’t be allowed. These are useful exceptions for an example document with no sensitive information.
To play with the document, it is best to make a copy and become its owner. Click “Save Copy”, and place the document in your Personal area or in a team site. Share the document with someone else as an editor and make sure they see what you expect.
You’ll want to turn off the “Special Rules” that allowed you to inspect the example and to make a complete copy of it:
Remember to hit “Save” after you change rules, so they take effect.
Suppose we now want to restrict the leads to be viewed only by the person they are assigned to (or by the owner). We can do that in several ways. One convenient way is to add a table listing team members, including their email address:
Once we have such a table, we can make the
Assignment column refer to it.
See https://public.getgrist.com/vuPduz2UdJDi/Lead-list-with-team/p/fork for
the complete example (you’ll need to make a copy to get full access,
otherwise you’ll see a filtered view).
We can then use the team members in rules, via a user attribute table:
Then every user the document is shared with (other than owners) will see a filtered view of just those leads assigned to them:
Read our introduction to access rules to learn more about what you can do with access rules.