orgs

与团队和组织合作

选择命令行版本:

描述

🌐 Description

组织用户分为三个级别:

🌐 There are three levels of org users:

  1. 超级管理员,控制计费并将人员添加到组织。
  2. 团队管理员,管理团队成员和包访问。
  3. 开发者,在他们有权访问的包上工作。

超级管理员是唯一可以向组织添加用户的人,因为这会影响每月账单。超级管理员将使用网站来管理成员资格。每个组织都有一个 developers 团队,所有用户都会自动加入该团队。

🌐 The super admin is the only person who can add users to the org because it impacts the monthly bill. The super admin will use the website to manage membership. Every org has a developers team that all users are automatically added to.

团队管理员是负责管理团队创建、团队成员以及团队的软件包访问权限的人。团队管理员授予的是团队的软件包访问权限,而不是个人的。

🌐 The team admin is the person who manages team creation, team membership, and package access for teams. The team admin grants package access to teams, not individuals.

开发者将能够根据他们所属的团队访问软件包。访问权限可以是读写或只读。

🌐 The developer will be able to access packages based on the teams they are on. Access is either read-write or read-only.

有两个主要命令:

🌐 There are two main commands:

  1. npm team 查看 npm 团队 获取更多详情
  2. npm access 查看 npm access 以获取更多详情

团队管理员创建团队

🌐 Team Admins create teams

  • 检查你已将谁添加到你的组织:
npm team ls <org>:developers
  • 每个组织都会自动获得一个 developers 团队,因此你可以查看组织中所有团队成员的完整列表。该团队会自动获得对所有软件包的读写权限,但你可以使用 access 命令更改这一权限。
  • 创建一个新团队:
npm team create <org:team>
  • 将成员添加到该团队:
npm team add <org:team> <user>

发布包并调整包访问

🌐 Publish a package and adjust package access

  • 在包目录中,运行
npm init --scope=<org>

为你的组织确定范围并照常发布

🌐 to scope it for your org & publish as usual

  • 授予访问权限:
npm access grant <read-only|read-write> <org:team> [<package>]
  • 撤销访问:
npm access revoke <org:team> [<package>]

监控你的包访问

🌐 Monitor your package access

  • 查看团队成员可以访问哪些组织包:
npm access ls-packages <org> <user>
  • 查看特定团队可用的包:
npm access ls-packages <org:team>
  • 检查哪些团队正在协作处理一个包:
npm access ls-collaborators <pkg>

也可以看看

🌐 See also