Phase 13, part 8: a team's data is theirs
The owner exports everything from Settings → Your data (the keys only with their password), and can delete the team: it closes at once, everyone in it is told, it can be undone for 30 days, and then its schema, files, agents and memberships go for good. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -434,3 +434,23 @@ func (s *Server) RunAccounts(ctx context.Context) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// RunTeams removes, every hour, the teams whose 30 days after being
|
||||
// deleted have passed (the multi-tenant platform's job).
|
||||
func (s *Server) RunTeams(ctx context.Context) {
|
||||
if !s.multi() {
|
||||
return
|
||||
}
|
||||
tick := time.NewTicker(time.Hour)
|
||||
defer tick.Stop()
|
||||
for {
|
||||
if _, err := s.jobs().Do(ctx, "platform:purge", func(ctx context.Context) { s.purgeTeams(ctx, time.Now()) }); err != nil {
|
||||
s.Log.Warn("teams: taking the lock", "err", err)
|
||||
}
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case <-tick.C:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user