Teams

Pace comes with team functionality out of the box. After all, what's a SaaS these days without team functionality.

By default, Pace comes with 3 roles:

  • admin
  • owner
  • member

At the moment, Pace doesn't enforce any permissions or restrictions on these roles. Of course, you can tweak this as you like.

Team creation

Personal teams

By default, a personal team is created for every user that registers on your application. They will the owner and only member on the team as new members can't be added to a personal team. You can rename the team but you cannot delete it.

Non-personal teams

You can also create other teams which you can add as many members as you want to. You can find the link to new create teams in the user dropdown menu.

Also, you can rename these teams and unlike personal teams, you can also delete them.

Inviting team members

Pace comes with a robust team invitation system that allows you to invite users to join your team. You can assign a role to the user you inviting.

Also, you can change the user's role of the invitation, resend or even revoke the invitation.

Members management

You can manage team members by either changing their roles or removing them from a team.

Current team and switching teams

Since users can belong to many teams, Pace allows you to keep track of a user's current team and a way to switch to a different team.

The users table has a current_team_id column for storing a user's current team ID. There is also a belongsTo (Team) relationship on the User model to retrieve a user's current team based on the current_team_id column.

In the user dropdown menus, there is a list of teams a user belongs to and from which the user can select any to switch. Upon switching to a different team, the user currentTeamId property will be updated with the new team ID.

Disabling teams

If teams functionality doesn't apply to your application, you can disable it in config/pace.ts:

 teams: false,