> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/work/file-library/shared-spaces.md).

# 共用空間

用共用空間讓跨部門的成員一起使用檔案：依角色授權、建立前預覽會取得權限的成員，角色調整後可見範圍自動跟著變。

共用空間適合放「不是全組織都需要、但不只一個部門會用」的檔案，例如業務與行銷一起使用的上市素材。共用空間依**角色**授權：成員的角色符合，就看得到這個空間；角色調整後，看得到的空間會自動跟著變，不用一個一個設定。

## 使用情境 <a href="#use-case" id="use-case"></a>

新品上市需要業務部與產品部一起準備資料。行銷主管在檔案庫建立「A1 上市｜業務行銷共用」共用空間，授權角色勾選 <mark style="color:blue;">業務部門</mark> 與 <mark style="color:blue;">產品部門</mark>，視窗下方立即列出會取得存取權的成員。之後有同事調到業務部門，主管不用另外設定，他登入檔案庫就會看到這個空間。

***

## 建立共用空間 <a href="#create-shared-space" id="create-shared-space"></a>

### 1. 開啟建立視窗 <a href="#open-create" id="open-create"></a>

在檔案庫左側空間樹的 <mark style="color:blue;">共用空間</mark> 旁點選 <mark style="color:blue;">＋</mark>（<mark style="color:blue;">建立共用空間</mark>）。

### 2. 填寫名稱與授權角色 <a href="#name-and-roles" id="name-and-roles"></a>

輸入 <mark style="color:blue;">空間名稱</mark>，在 <mark style="color:blue;">授權角色</mark> 選擇要開放的自訂角色（預設角色不能選）。也可以先不選角色，之後再加；沒有授權角色的空間只有建立者與擁有者看得到。組織還沒有自訂角色時，清單會顯示「尚無自訂角色，請先建立自訂角色」，有角色管理權限的人可以點 <mark style="color:blue;">前往角色設定</mark>。下方 <mark style="color:blue;">即將取得存取權的成員</mark> 會即時列出這些角色中的成員；若有成員缺少「可被邀請加入共用空間權限」，也會在這裡提示。

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-7ff36a40432bb0ae490d9ce7e648dd3f41b0d44f%2Ffile-library-shared-space.png?alt=media" alt="建立共用空間視窗，授權角色選擇業務部門與產品部門，下方預覽即將取得存取權的成員"><figcaption><p>建立前先預覽哪些成員會取得存取權</p></figcaption></figure>

### 3. 確認建立 <a href="#confirm-create" id="confirm-create"></a>

按 <mark style="color:blue;">確認</mark> 後，共用空間會出現在空間樹中。和其他空間一樣，共用空間的最上層只能建立檔案工作區，工作區一樣可以 <mark style="color:blue;">由此開始對話</mark>、使用工作區指引與版本紀錄。

***

## 誰看得到共用空間 <a href="#who-can-access" id="who-can-access"></a>

成員同時符合以下兩個條件，就看得到共用空間：

1. 所屬角色在該空間的 <mark style="color:blue;">授權角色</mark> 中
2. 所屬角色有 <mark style="color:blue;">可被邀請加入共用空間權限</mark>

建立者本人一定看得到。組織擁有者不需要可被邀請權限，但所屬角色仍須在授權角色中；授權角色全部被刪除時，組織擁有者也看得到。共用空間只能授權給角色，不能點名個人；要開放給特定成員，請把他加入對應角色。

{% hint style="info" %}
建立、刪除共用空間，以及修改空間名稱與授權角色，需要 <mark style="color:blue;">建立共用空間權限</mark>。權限設定見 [角色權限管理](https://docs.maiagent.ai/org/roles/role-permission.md#permission-structure-overview)。
{% endhint %}

***

## 編輯與刪除 <a href="#edit-and-delete" id="edit-and-delete"></a>

* **編輯**：在空間上開啟 <mark style="color:blue;">編輯共用空間</mark>，可以修改名稱與授權角色，也可以把授權角色清空。變更會記錄在空間的版本紀錄中。
* **刪除**：空間內還有內容時無法刪除，請先清空再刪除。
* **沒有授權角色時**（清空，或授權的角色都被刪除）：只剩建立者與組織擁有者可以存取，需要時再加入授權角色。

***

## 相關頁面 <a href="#related" id="related"></a>

* [檔案庫](https://docs.maiagent.ai/work/file-library.md)
* [角色權限管理](https://docs.maiagent.ai/org/roles/role-permission.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/work/file-library/shared-spaces.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
