成员
复制一个包含安装步骤和本插件的完整Markdown指南的设置命令。
组织成员是有权访问您的Capgo组织的用户。每个成员都有一个特定的角色,决定了他们在组织中的权限。有效地管理成员对于维护团队的安全性和协作至关重要。
成员角色
标题为“成员角色”的部分Regular Roles
常规角色- read可以查看资源但不能进行修改
- upload可以上传新包并查看资源
- write可以修改资源并上传包
- admin可以管理组织设置和成员
- super_admin拥有对组织的完全控制
邀请角色
邀请角色部分- invite_read等待读取访问邀请
- invite_upload等待上传访问邀请
- invite_write等待写入访问邀请
- invite_admin等待管理员访问邀请
- invite_super_admin等待超级管理员访问邀请
最佳实践
最佳实践- 角色分配:分配角色时遵循最小特权原则
- 常规审计:定期审查成员访问权限并删除未使用的账户
- 入职:为添加新成员和分配角色建立明确的流程
- 离职:及时移除离开组织的成员的访问权限
API
APIPOST
添加成员https://api.capgo.app/organization/members/
添加一个新成员到一个组织或更新一个现有成员的角色。请注意,您只能邀请已经有一个Capgo账户的用户 - 邮件必须对应一个现有的Capgo用户。
请求体
添加成员interface MemberCreate { orgId: string email: string role: "read" | "upload" | "write" | "admin" | "super_admin"}示例请求
终端窗口curl -X POST \ -H "authorization: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "orgId": "org_123", "email": "newmember@example.com", "role": "write" }' \ https://api.capgo.app/organization/members/{ "status": "OK", "data": { "uid": "user_789", "email": "newmember@example.com", "role": "invite_write", "image_url": null }}注意:
- 添加新成员时,他们会接收一封邀请邮件。他们的角色将以“invite_”开头,直到他们接受邀请为止。
- 用户必须在添加他们之前已经有一个Capgo账户。如果他们没有账户,他们应该先在 https://console.capgo.app/register/
GET
标题:GEThttps://api.capgo.app/organization/members/
获取组织中的所有成员。
请求参数
标题:请求参数interface MemberQuery { orgId: string}interface Member { uid: string; email: string; image_url: string; role: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";}curl -H "authorization: your-api-key" \ "https://api.capgo.app/organization/members/?orgId=org_123"{ "data": [ { "uid": "user_123", "email": "john@example.com", "image_url": "https://example.com/avatar.png", "role": "admin" }, { "uid": "user_456", "email": "jane@example.com", "image_url": "https://example.com/avatar2.png", "role": "write" }, { "uid": "user_789", "email": "bob@example.com", "image_url": null, "role": "invite_read" } ]}DELETE
Section titled “DELETE”https://api.capgo.app/organization/members/
从组织中删除成员。 这将立即撤销他们的访问权。
Request Body
请求体interface MemberDelete { orgId: string email: string}示例请求
示例请求curl -X DELETE \ -H "authorization: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "orgId": "org_123", "email": "user@example.com" }' \ https://api.capgo.app/organization/members/成功响应
成功响应{ "status": "OK"}错误处理
错误处理常见错误场景及其响应:
// Member not found{ "error": "Member not found", "status": "KO"}
// Invalid role{ "error": "Invalid role specified", "status": "KO"}
// Permission denied{ "error": "Insufficient permissions to manage members", "status": "KO"}
// Cannot remove last admin{ "error": "Cannot remove the last admin from the organization", "status": "KO"}
// Invalid email{ "error": "Invalid email format", "status": "KO"}
// Member already exists{ "error": "Member already exists in organization", "status": "KO"}常见用例
名为“常见用例”的部分- 团队扩张: 为适当角色添加新团队成员
- : 根据责任变化管理成员权限: 定期审查成员列表和角色
- : 在组织结构变化时更新角色__CAPGO_KEEP_0__
- __CAPGO_KEEP_0____CAPGO_KEEP_0__
继续从成员中
成员的标题:继续从成员中如果您正在使用 成员 来规划安全性和合规性,连接它与 加密 加密的实现细节在加密中 合规 合规的实现细节在合规中 Capgo 安全扫描器 Capgo 安全扫描器的产品工作流程中 Capgo 安全 为产品工作流程在Capgo安全中 Capgo信任中心 为产品工作流程在Capgo信任中心中