# Access Control for Notebook

## Access Scopes for Notebook

The access control for notebooks vary depending on the (root) folder of the notebook. There are four types of access scopes for notebooks:

| Scope     | Description                                                                 |
| --------- | --------------------------------------------------------------------------- |
| Workspace | All users in the workspace can access                                       |
| Teamspace | Users in the teamspace can access                                           |
| Private   | Only the owner can access                                                   |
| Shared    | Users and groups who have been granted by additional permissions can access |

## Resource Roles for Notebooks

The following roles determine the operations users can perform on notebooks.

| Role Name       | Summary            |
| --------------- | ------------------ |
| Notebook Editor | Can edit notebooks |
| Notebook Viewer | Can view notebooks |

## Notebook Operations and Access Control Rules

Below are the operations that can be performed with notebooks and the corresponding roles required for each scope.

{% hint style="warning" %}
Executing SQL written in a Notebook and retrieving its results are determined by the access rights on the Connection, regardless of the access right on the Notebook itself. Therefore, please refer to the [Access Control for Connection](/access-control/access-control-for-resources/access-control-for-connection.md).
{% endhint %}

{% hint style="warning" %}
The access rights to notebooks in a teamspace are determined by the access rights granted in the teamspace. For more details, please refer to [Access Control for Teamspace](/access-control/access-control-for-resources/access-control-for-teamspace.md).
{% endhint %}

<table data-full-width="true"><thead><tr><th width="419">Operations</th><th width="173">scope: Workspace</th><th width="203">scope: Teamspace</th><th width="170">scope: Private</th><th width="222">scope: Shared</th></tr></thead><tbody><tr><td><p>View contents</p><p>Comment</p></td><td>Workspace Viewer</td><td>"Workspace Viewer"<br>AND "Teamspace Viewer"</td><td>Workspace Editor</td><td>"Workspace Viewer"<br>AND "Notebook Viewer"</td></tr><tr><td>Edit notebooks (exclude running SQL).</td><td>Workspace Editor</td><td>"Workspace Editor"<br>AND "Teamspace Editor"</td><td>Workspace Editor</td><td>"Workspace Editor"<br>AND "Notebook Editor"</td></tr><tr><td><p>Create, move, delete notebooks</p><p>Manage folders</p></td><td>Workspace Editor</td><td>"Workspace Editor"<br>AND "Teamspace Editor"</td><td>Workspace Editor</td><td>N/A</td></tr><tr><td>Share directly with specific users or groups.</td><td>N/A</td><td>"Workspace Viewer"<br>AND "Teamspace Editor"</td><td>Workspace Editor</td><td>N/A</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.codatum.com/access-control/access-control-for-resources/access-control-for-notebook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
