feishu-perm
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFeishu Permission Tool
飞书权限管理工具
Single tool for managing file/document permissions.
feishu_perm单个工具用于管理文件/文档权限。
feishu_permActions
操作
List Collaborators
列出协作者
json
{ "action": "list", "token": "ABC123", "type": "docx" }Returns: members with member_type, member_id, perm, name.
json
{ "action": "list", "token": "ABC123", "type": "docx" }返回结果:包含member_type、member_id、perm、name的成员信息。
Add Collaborator
添加协作者
json
{ "action": "add", "token": "ABC123", "type": "docx", "member_type": "email", "member_id": "user@example.com", "perm": "edit" }json
{ "action": "add", "token": "ABC123", "type": "docx", "member_type": "email", "member_id": "user@example.com", "perm": "edit" }Remove Collaborator
移除协作者
json
{ "action": "remove", "token": "ABC123", "type": "docx", "member_type": "email", "member_id": "user@example.com" }json
{ "action": "remove", "token": "ABC123", "type": "docx", "member_type": "email", "member_id": "user@example.com" }Token Types
Token类型
| Type | Description |
|---|---|
| Old format document |
| New format document |
| Spreadsheet |
| Multi-dimensional table |
| Folder |
| Uploaded file |
| Wiki node |
| Mind map |
| 类型 | 描述 |
|---|---|
| 旧格式文档 |
| 新格式文档 |
| 电子表格 |
| 多维表格 |
| 文件夹 |
| 上传文件 |
| Wiki节点 |
| 思维导图 |
Member Types
成员类型
| Type | Description |
|---|---|
| Email address |
| User open_id |
| User user_id |
| User union_id |
| Group chat open_id |
| Department open_id |
| 类型 | 描述 |
|---|---|
| 电子邮箱 |
| 用户open_id |
| 用户user_id |
| 用户union_id |
| 群组open_id |
| 部门open_id |
Permission Levels
权限等级
| Perm | Description |
|---|---|
| View only |
| Can edit |
| Full access (can manage permissions) |
| 权限 | 描述 |
|---|---|
| 仅查看 |
| 可编辑 |
| 完全权限(可管理权限) |
Examples
示例
Share document with email:
json
{ "action": "add", "token": "doxcnXXX", "type": "docx", "member_type": "email", "member_id": "alice@company.com", "perm": "edit" }Share folder with group:
json
{ "action": "add", "token": "fldcnXXX", "type": "folder", "member_type": "openchat", "member_id": "oc_xxx", "perm": "view" }通过邮箱分享文档:
json
{ "action": "add", "token": "doxcnXXX", "type": "docx", "member_type": "email", "member_id": "alice@company.com", "perm": "edit" }通过群组分享文件夹:
json
{ "action": "add", "token": "fldcnXXX", "type": "folder", "member_type": "openchat", "member_id": "oc_xxx", "perm": "view" }Configuration
配置
yaml
channels:
feishu:
tools:
perm: true # default: false (disabled)Note: This tool is disabled by default because permission management is a sensitive operation. Enable explicitly if needed.
yaml
channels:
feishu:
tools:
perm: true # default: false (disabled)注意: 由于权限管理属于敏感操作,此工具默认处于禁用状态。如需使用请手动启用。
Permissions
所需权限
Required:
drive:permission必填:
drive:permission