> For the complete documentation index, see [llms.txt](https://docs.codatum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codatum.com/~/changes/201dQUjmKCknHYjvl0qI/access-control/access-control-for-resources/access-control-for-notebook.md).

# Access Control for Notebook

## Access Scopes for Notebooks

The access control for notebooks vary depending on the access scopes. There are four types of access scopes for notebooks:

<table data-full-width="true"><thead><tr><th>Scope</th><th>Description</th></tr></thead><tbody><tr><td>Workspace</td><td>Notebooks linked to the workspace.</td></tr><tr><td>Teamspace</td><td>Notebooks linked to a teamspace.</td></tr><tr><td>Private</td><td>Notebooks linked to a user.</td></tr><tr><td>Shared</td><td>Notebooks that are directly shared to specific users or groups.</td></tr></tbody></table>

## Roles for Notebooks

The notebook access control are determined by the roles corresponding to the access scopes (e.g., workspace.Viewer, teamspace.Editor). Therefore, notebook roles to each notebooks exist only for shared notebooks.

<table data-full-width="true"><thead><tr><th>Role Name</th><th>Summary</th></tr></thead><tbody><tr><td>notebook.shared.Editor</td><td>Can edit notebooks that are directly shared by someone.</td></tr><tr><td>notebook.shared.Viewer</td><td>Can view notebooks that are directly shared by someone.</td></tr></tbody></table>

## 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[ Connection page](/~/changes/201dQUjmKCknHYjvl0qI/access-control/access-control-for-resources/access-control-for-connection.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 notebook contents (exclude results of SQL).</p><p>Comment on notebooks.</p></td><td>workspace.Viewer</td><td>workspace.Viewer AND teamspace.Viewer</td><td>workspace.Editor</td><td>workspace.Viewer AND notebook.shared.Viewer</td></tr><tr><td>Edit notebooks (exclude running SQL).</td><td>workspace.Editor</td><td>workspace.Editor AND teamspace.Editor</td><td>workspace.Editor</td><td>workspace.Editor AND notebook.shared.Editor</td></tr><tr><td>Create, move, and delete notebooks, manage folders.</td><td>workspace.Editor</td><td>workspace.Editor AND teamspace.Editor</td><td>workspace.Editor</td><td>N/A</td></tr><tr><td>Share notebooks directly to specific users or groups.</td><td>N/A</td><td>workspace.Viewer AND teamspace.Editor</td><td>workspace.Editor</td><td>N/A</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.codatum.com/~/changes/201dQUjmKCknHYjvl0qI/access-control/access-control-for-resources/access-control-for-notebook.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
