mkteam

command
v0.293.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command mkteam makes, reads and removes a TEAM the operator (user 1) manages, on the e2e database — for a browser spec on the shared password-mode server, which has no GoTrue and so no /admin/teams page to make one with. The browser session's principal reads its memberships from team_members on every request (principalFor), so a team made here is the operator's at once, with no new sign-in.

DATABASE_URL=…_e2e go run ./e2e/mkteam create <name>     prints the team's id
DATABASE_URL=…_e2e go run ./e2e/mkteam officers <id>     prints how many officer defs and types it owns
DATABASE_URL=…_e2e go run ./e2e/mkteam remove <id>       removes it and its memberships

The rows are the ones users.CreateTeam writes (a users row of kind 'team', role 'member', and the first manager's membership), without its audit row. remove deletes the team's audit rows with it (the seed's accounts reset deletes the audit log whole anyway), so it leaves nothing that reset would trip on.

🔴 remove DELETES NO OFFICER ROW. A team that still owns one is a failure of the spec that made it (a refusal that did not refuse), so remove fails loudly on the foreign key rather than tidying the evidence away.

🔴 IT REFUSES ANY DATABASE WHOSE NAME DOES NOT END IN "_e2e" (e2edb.Check): it writes users and team_members as the login role, which nothing outside a fixture may do.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL