# Sharing and access

Share a document by its link or with people by their email, choose whether they can edit, comment or only view, and see what each role can do.

Every document has a link, and a shared document has people: its owner, and everyone who joined through the link or was added by email. The owner decides, in the **Access…** sheet, whether the link lets anyone in and what people can do once they are there.

Sharing goes through the server, so it needs you signed in ([Offline and sync](/docs/sync/)). Signed out, the **Access** sheet says **Sign in to share documents. Signed out, a document stays on this device.**

## Copy a document's link

- In the library, open a card's three-dot **Document menu** and choose **Copy link**. A notice says **Link copied**.
- In an open document, open the three-dot **Document menu** in the header and choose **Copy link**.
- In the **Access** sheet, press **Copy link** at the bottom. The button changes to **Link copied**.

On the web the link is the document's address: `https://entz.app/doc/` followed by the document's id. On a phone it is an `entz://` link, which opens in the Entz app. Anyone can paste either kind into **New…** > **Open by id…** in their library ([The library](/docs/library/)).

A link opens a document only once the document is on the server. A document you made while signed out goes up the first time you open it signed in, so open it once before you send its link.

## Who the link lets in

Choose **Access…** from a card's menu or from the open document's menu. The first card of the sheet is the link:

- **Anyone with the link** is a switch. On, anyone who opens the link joins the document. Off, the line under it says **Only the people below**, and the link opens the document for them alone.
- While the switch is on, **Edit**, **Comment** and **View** choose what people who join through the link can do. The line under the switch says **They can edit**, **They can comment** or **They can view**.

A new document starts with its link on and set to **Edit**: anyone who has the link can open the document and change it. Set the link to **Comment** or **View**, or turn it off, before you send it to anyone you do not want editing.

Only the owner changes these settings, and only while online; everyone else sees them as they are. A change applies to people who join from then on. People already in keep the role they joined with.

## Roles

| Role | The sheet says | What they can do |
|---|---|---|
| Owner | **Owner** | Everything a writer can, and set the link, add people, change their roles and remove them, delete anyone's comment, and delete the document for everyone. |
| Writer | **Can edit** | Edit the document, add tabs, and comment. |
| Commenter | **Can comment** | Read the document, start threads, reply, resolve and reopen them, and edit or delete their own comments. |
| Reader | **Can view** | Read the document and its comments, and see and follow who is there. |

The person who made a document is its owner. A commenter or a reader cannot type in the document: the status bar says **Comment only** or **View only** beside the connection dot ([Comments](/docs/comments/), [Presence and following](/docs/presence/)). Anyone who can open a document can still export it, or make a copy of their own with **Make a copy** ([Import and export](/docs/import-export/)).

## Opening a link someone sent you

- Signed in, the document opens and you join it with the role its link gives. It stays in your library from then on.
- Signed out, Entz adds the document to your library and goes back to it with **Sign in to open this document**. Once you sign in, its card opens it.
- When the link is off and you are not one of the document's people, Entz goes back to the library with **You do not have access to that document**.

## People

Under **People**, the **Access** sheet lists everyone who has the document, each with their role. Every member sees the list; the owner also sees each person's email.

To add someone, the owner:

1. Types the email the person signs in to Entz with into **Add people by email**.
2. Presses **Add**. The person joins with **Can edit**.
3. To give them another role, opens the menu that shows their role beside their name and chooses **Can edit**, **Can comment** or **Can view**. **Remove** in the same menu takes them off the document.

The person must have signed in to Entz at least once with that email: otherwise the sheet says **No one has signed in as** followed by the address. Entz sends no email or notification. The document appears in their library (on a phone, the next time Entz connects), so tell them, or send them the link too.

:::note
Someone you remove can join again through the link while it is on, with the link's role, so turn the link off to keep them out. A document they already opened keeps its last saved copy on their device.
:::

## Tabs

A document's tabs share its people and its link: what you change in **Access** applies to every tab ([Tabs](/docs/tabs/)).

## Deleting a document

**Delete**, in a card's menu or the open document's menu, asks first. What it deletes depends on who you are and whether you are online:

- **The owner, online.** The document is deleted from this device and from the server, with its tabs and comments, for everyone it was shared with. Anyone who had opened it keeps the copy saved on their own device.
- **Anyone else.** The document leaves this device and your library. It stays on the server for its owner and the others, and opening its link again brings it back.
- **Offline or signed out.** Only this device's copy goes. A document that has synced stays on the server and returns to your library the next time Entz connects. To delete it for everyone, delete it again while online.
