Sub topic 4
General Access and Link Sharing
Assume you can open a Google Sheet and use its Share dialog. You should also understand the difference between Viewer, Commenter, and Editor roles. This chapter focuses on people who receive a link rather than an invitation sent to a named person.
The access model
A spreadsheet has two kinds of access:
- Named access applies to specific Google accounts or groups that you add.
- General access applies to people who reach the file through a link.
Open Share, then look under General access. The main choices are usually:
- Restricted: only people who already have permission can open the file.
- Anyone with the link: anyone who obtains the link can open the file, even if you did not add their email address.
General access does not automatically mean that everyone can edit. The role beside the link setting controls what link users can do.
| General access setting | Link role | Typical result |
|---|---|---|
| Restricted | Any role | Only explicitly permitted people can open the file |
| Anyone with the link | Viewer | Anyone with the link can read the spreadsheet |
| Anyone with the link | Commenter | Anyone with the link can read and add comments |
| Anyone with the link | Editor | Anyone with the link can change the spreadsheet |
Google Workspace administrators may replace these choices with options such as Your organization or Anyone in your organization with the link. Those settings limit access to accounts in your organization.
Choosing the link role
Use Viewer when recipients only need to read results. Use Commenter when they must give feedback without changing cell values. Use Editor when they need to enter data or modify formulas.
Choose the least powerful role that completes the task. An Editor can change formulas, delete data, invite other people if allowed, and possibly alter sharing settings. A link shared in a chat, document, or email can also be forwarded.
Change or remove link access
To change general access:
- Select Share.
- Open the general access menu.
- Choose Restricted, or choose the available organization or link option.
- If link access remains enabled, select the role.
- Select Done.
Changing the role affects future access through that general-access rule. It does not necessarily remove separate permissions that you granted to named people. For example, changing the link role to Viewer does not usually make a specifically invited Editor into a Viewer.
To stop link access entirely, choose Restricted. Then review the people and groups listed in the Share dialog and remove any permission that should no longer exist.
Set link sharing with Apps Script
You can set a spreadsheet's general access to link viewers with Apps Script. In the spreadsheet, open Extensions > Apps Script, add this function, and run it after granting the requested authorization:
function makeLinkViewOnly() {
const spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
const file = DriveApp.getFileById(spreadsheet.getId());
file.setSharing(
DriveApp.Access.ANYONE_WITH_LINK,
DriveApp.Permission.VIEW
);
}This changes the general access rule for the file. It does not remove named editors or protect individual sheets.
Exercise
A project team needs public read-only access to a status sheet, but only two teammates should edit it. Which general access role should you choose, and how should the teammates be added?
Show answer
Choose Anyone with the link and set its role to Viewer. Add the two teammates by name as Editors. Their named Editor permission is separate from the link's Viewer role.