Managing Teams in NPM

Table of contents

1. About the development team

2. Create a team

3. Add organization members to the team

3.1 Manage teams from the CLI

4. Remove organization members from the team

5. Manage Team Access to Organization Packs

5.1 Adding package access to a team

Team Add Package Access on Web Pages

Add package access to a team using the CLI

5.2 Removing package access from a group

Remove Package Access from Teams on Web Pages

Remove package access from a group using the CLI

5.3 Changing package access for a team 

Change a team's package access on a web page


1. About the development team

The " developers " team is automatically created when the organization is created. By default, developer teams have read/write access to all new packages created organization-wide.

  • Members added to the organization (including the organization owner) are automatically added to the developer team
  • For any newly created package under the scope of the organization, the maintainers field in the package.json file will be automatically populated with members of the current developer team

If you create a new package within the scope of your organization and you don't want members of the development team to have read/write access to the package, the owner or administrator can remove the development team's access to the package.

If an owner adds a new member to the organization and doesn't want that member to be part of the developer team, the owner can remove it.

Note : Developer teams can no longer be removed from an organization due to the following reasons:

  • It is the source of truth for all users, packages, and default permissions in your organization.
  • When you want to restrict write access, it's best to set the default permissions to read-only and create a separate team to manage write access.

2. Create a team

As an organization owner or team administrator, you can create teams to manage access to packages managed by your organization.

Note : Team names cannot be changed. To "rename" a team, the team must be deleted and recreated. Note: Team names cannot be changed. To "rename" a team, the team must be deleted and recreated.

1. Enter the npm login page , and enter the corresponding user name and password to log in.

2. In the upper right corner of the page, click your profile picture, then click  Account.

 3. In the left sidebar, click your organization name.

4. On the Organization Settings page, click  Teams

5. In the Name and Description fields, type a team name and a useful description. Team names must be in lowercase letters and cannot contain spaces or punctuation.

 6. Click "Create Team"

At the top of the page, there is the following prompt, that is, the addition is successful.

 Note : By default, new teams have no member or package access. After creating a team, add packages and members from the Team tab.

3. Add organization members to the team

As an organization owner or team administrator, you can add organization members to a team to give them access to specific sets of packages managed by the organization. 

Note : npm users must be members of your organization before they can be added to a team.

1. Enter the npm login page , and enter the corresponding user name and password to log in.

2. In the upper right corner of the page, click your profile picture, then click  Account.

 3. In the left sidebar, click your organization name.

4. On the Organization Settings page, click  Teams

5. Next to the team you want to add members to, click Members

6. In the Username field, type the npm username of the organization member you want to add to the team.

 7. Click " +Add User ".

Note : Organization members will not be notified when they are added to a team. We recommend telling members of your organization that you've added them to the team.

3.1 Manage teams from the CLI

If you wish to manage team members from the Command Line Interface (CLI), you can use a command like this:

npm team

4. Remove organization members from the team

As an organization owner or team admin, you can remove organization members from a team if they no longer need access to packages accessible to the team.

1. Enter the npm login page , and enter the corresponding user name and password to log in.

2. In the upper right corner of the page, click your profile picture, then click  Account.

 3. In the left sidebar, click your organization name.

4. On the Organization Settings page, click  Teams

5. In the team member list, find the member to be deleted.

6. In the member row, to remove a member from the team, click the X

Note : Removing a member from a team, even if the member is the only team they belong to, will not remove them from the organization.

5. Manage Team Access to Organization Packs

As an organization owner or team admin, you can add package access to or remove package access from teams in your organization.

5.1 Adding package access to a team

Team Add Package Access on Web Pages

1. Enter the npm login page , and enter the corresponding user name and password to log in.

2. In the upper right corner of the page, click your profile picture, then click  Account.

 3. In the left sidebar, click your organization name.

4. On the Organization Settings page, click  Teams

5. Next to the team you want to add package access to, click Packages .

6. In the "Package" field of the "Add Package" page, type the name of the package and select it from the drop-down menu.

7. Click " + Add Existing Package " to add an existing package.

8. Next to the package name, click " read " or " read/write " to set team permissions for the package. 

Add package access to a team using the CLI

As an organization owner or team admin, you can use the CLI accesscommand at the command line: 

npm access grant <read-only|read-write> <org:team> [<package>]

5.2 Removing package access from a group

Remove Package Access from Teams on Web Pages

1. Enter the npm login page , and enter the corresponding user name and password to log in.

2. In the upper right corner of the page, click your profile picture, then click  Account.

 3. In the left sidebar, click your organization name.

4. On the Organization Settings page, click  Teams

5. Next to the team you want to add package access to, click Packages .

6. Next to the name of the package from which you want to remove access, click the x.

Remove package access from a group using the CLI

As an organization owner or team admin, you can also use the CLI  accesscommand to revoke package access on the team from the command line: 

npm access revoke <org:team> [<package>]

5.3 Changing package access for a team 

Change a team's package access on a web page

1. Enter the npm login page , and enter the corresponding user name and password to log in.

2. In the upper right corner of the page, click your profile picture, then click  Account.

 3. In the left sidebar, click your organization name.

4. On the Organization Settings page, click  Teams

5. Next to the name of the team you want to delete, click the X.


 

Guess you like

Origin blog.csdn.net/u014388408/article/details/132419379
NPM