Phase 14, parts 5 and 6: seats, and moving down to Free
Seats: inviting past the seats paid for offers the owner to add one (Stripe prorates it); admins are told to ask the owner; Free has two. Moving down: past the plan's seats, the owner and one other (the owner's pick, or the first to join) edit and the rest read; storage is measured hourly, and past the plan's, photo uploads and the SEO crawl stop. Nothing is deleted. TEST.md section 18. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,9 @@ type viewer struct {
|
||||
Platform bool // runs the multi-tenant platform (SUPERMARKET_PLATFORM_ADMINS)
|
||||
Viewing bool // a platform admin viewing a team, read-only
|
||||
ReadOnly bool // the team's subscription has lapsed: nothing may change
|
||||
// More people than the plan's seats, and not one kept: they read, and
|
||||
// change nothing.
|
||||
OverSeats bool
|
||||
}
|
||||
|
||||
// localOwner is the local edition's one user.
|
||||
@@ -172,6 +175,9 @@ func (s *Server) lookupSession(r *http.Request) (*viewer, error) {
|
||||
if ts, err := s.forTeam(sess.Team); err == nil {
|
||||
plan, ro := ts.teamPlan()
|
||||
v.Member, v.ReadOnly = planned(m, plan, ro), ro
|
||||
if kept, _ := ts.kept(); kept != nil && !kept[u.ID] {
|
||||
v.Member, v.OverSeats = viewOnly(v.Member), true
|
||||
}
|
||||
}
|
||||
}
|
||||
return v, nil
|
||||
|
||||
Reference in New Issue
Block a user