Skip to content

Teams & RBAC

Nodebyte is multi-tenant — every resource (nodes, tokens, invites) is scoped to a team. Users can belong to multiple teams and switch between them. Access is controlled by four roles.

RolePermissions
ViewerRead-only access to team nodes
MemberCreate, edit, and delete nodes. Manage own settings.
AdminEverything a member can do, plus: manage team members, create invites, manage registration tokens
OwnerFull control including deleting the team and managing other admins. Each team has at least one owner.

The hierarchy is: viewer < member < admin < owner.

When you register your first account, a team is created automatically. To create additional teams:

  1. Open the team switcher in the sidebar
  2. Click Create Team
  3. Enter a team name
  4. You become the owner of the new team

You can switch between teams at any time using the team switcher.

Admins and owners can invite new members by email:

  1. Navigate to Team in the sidebar
  2. Click Invite Member
  3. Enter the person’s email address and select a role
  4. They receive a link to join — if they don’t have a Nodebyte account, they’ll register first, then automatically join your team

Pending invites appear in the Team page. Admins can revoke an invite before it’s accepted.

Terminal window
curl -X POST http://localhost:8000/api/teams/{team_id}/invites \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"email": "colleague@example.com", "role": "member"}'

From the Team page, admins and owners can:

  • Change role — promote or demote a member (owners can set any role, admins can set up to admin)
  • Remove member — revoke team access immediately
Terminal window
curl -X PATCH http://localhost:8000/api/teams/{team_id}/members/{user_id} \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"role": "admin"}'

Users with is_superuser = true get a platform-wide Admin section in the sidebar:

  • Overview — total users, teams, and nodes at a glance
  • Users — search, activate/deactivate, toggle superuser status, delete any user
  • Teams — search, view member/node counts, delete any team

The first superuser is created with the create_admin.py script:

Terminal window
docker compose exec backend python scripts/create_admin.py

Existing superusers can promote other users from the admin console.

MethodEndpointDescription
GET/api/teamsList your teams
POST/api/teamsCreate a team
GET/api/teams/{team_id}/membersList team members
PATCH/api/teams/{team_id}/members/{user_id}Update member role
DELETE/api/teams/{team_id}/members/{user_id}Remove a member
POST/api/teams/{team_id}/invitesCreate an invite
GET/api/teams/{team_id}/invitesList pending invites
DELETE/api/teams/{team_id}/invites/{invite_id}Revoke an invite
GET/api/invites/{token}Get invite info (public)
POST/api/invites/{token}/acceptAccept an invite