Skip to content

v1.0.2 — API 令牌所需权限说明 / documents the required API token permissions

Latest

Choose a tag to compare

@cloud-fs cloud-fs released this 02 Aug 07:48

说明 API 令牌所需权限 —— 默认新建的令牌权限不够。
Documents the required API token permissions — the default token preset is not enough.


中文

重要:新建 API 令牌时,默认权限不够

在 CloudDrive2 → 设置 → API 令牌 中新建令牌,默认勾选的是一组只读权限。其中插件需要的两项默认是关闭的,必须手动勾上:

权限(CloudDrive2 中的名称) 默认勾选 插件用它做什么
推送消息(Push Messages) 订阅文件系统变化推送 —— 媒体库实时更新的全部基础
获取挂载点(Get Mounts) 读取挂载点表 —— 路径映射与网盘账号列表
列出文件(List Files) ✅ 是 解析路径、强制重新列出目录
读取文件(Read Files) ✅ 是 播放预热

漏勾的后果比较隐蔽:插件能连上,状态页显示正常,但媒体库永远不会自动更新。

症状对照

  • GET /CloudDrive/Status 显示 Connected: false,或 LastError 提到权限 → 多半漏了推送消息
  • GET /CloudDrive/PathMappings 返回空或报错 → 漏了获取挂载点

其余权限一律不需要 —— 插件不会写入、删除或修改任何文件。

本次改动

  • 插件设置页的「API 令牌」输入框下方直接列出所需权限,并标明哪两项默认不勾选
  • README 增加权限说明表与症状对照

功能代码没有改动。


English

Important: the default API token preset is not enough

Creating a token under CloudDrive2 → Settings → API tokens gives you a read-only preset. Two of the four permissions this plugin needs are not in it and must be ticked by hand:

Permission (as named in CloudDrive2) On by default What the plugin uses it for
Push Messages (推送消息) No Subscribing to the file-system change stream — all of the live library updates
Get Mounts (获取挂载点) No Reading the mount table — path mappings and the cloud account list
List Files (列出文件) ✅ Yes Resolving paths, forcing a folder re-list
Read Files (读取文件) ✅ Yes Playback prefetch

Missing them fails quietly: the plugin connects, reports healthy, and simply never updates a library.

Symptom guide

  • GET /CloudDrive/Status showing Connected: false, or a LastError mentioning permissions → Push Messages is missing
  • GET /CloudDrive/PathMappings empty or erroring → Get Mounts is missing

Nothing else is needed. The plugin never writes, deletes or modifies a file.

Changes

  • The plugin settings page now lists the required permissions directly under the API token field, marking which two are off by default
  • README gained a permissions table and the symptom guide

No functional code changes.