成员
复制一个包含安装步骤和本插件的完整 Markdown 指南的配置提示。
Organization members are users who have access to your Capgo organization. Each member has a specific role that determines their permissions within the organization. Managing members effectively is crucial for maintaining security and collaboration in your team.
Member Roles
Section titled “Member Roles”Regular Roles
Section titled “Regular Roles”- read: Can view resources but cannot make changes
- 上传: 可以上传新包并查看资源
- 写入: 可以修改资源并上传包
- 管理员: 可以管理组织设置和成员
- 超级管理员: 对组织有完全控制权
邀请角色
标题:邀请角色- 邀请读取: 等待读取访问邀请
- 邀请上传: 等待上传权限邀请
- 邀请写入: 等待写入权限邀请
- 邀请管理员: 等待管理员权限邀请
- 邀请超级管理员: 等待超级管理员权限邀请
最佳实践
: 名为“最佳实践”的部分- 角色分配: 分配角色时应遵循最小权限原则
- 常规审计: 定期审查成员访问并删除未使用的帐户
- 入职: 为添加新成员和分配角色建立明确的流程
- 离职: 及时移除离开组织的成员的访问权限
API
API添加新成员到组织或更新现有成员的角色。请注意,您只能邀请已经有一个 __CAPGO_KEEP_0__ 帐户的用户 - 邮件必须对应于一个现有的 __CAPGO_KEEP_1__ 用户。
请求体https://api.capgo.app/organization/members/
Add a new member to an organization or update an existing member’s role. Note that you can only invite users who already have a Capgo account - the email must correspond to an existing Capgo user.
Section titled “POST”
请求体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
GET API 请求https://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
标题为“DELETE”的部分https://api.capgo.app/organization/members/
从组织中移除成员。 这将立即撤销他们的访问权限。
请求体
标题为“请求体”的部分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 安全扫描器 Capgo 安全扫描器的产品工作流程 Capgo 安全 Capgo 安全的产品工作流程 Capgo 信任中心 Capgo 信任中心的产品工作流程