Phase 13, part 3: signing up, and several teams per person
On the multi-tenant edition anyone can set up a team: their account, the company and its website, whose registered domain the team works on (the profile keeps to it). A person can belong to several teams and switch between them from the sidebar, or set up another. Inviting someone who has an account adds them to the team. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -115,6 +115,12 @@ func (s *Server) cannotSignIn(u *users.User) string {
|
||||
case u.Status != users.Active || u.Kind != users.Person:
|
||||
return badSignIn
|
||||
}
|
||||
if s.multi() {
|
||||
if list, err := users.TeamsOf(s.platform(), u.ID); err != nil || len(list) == 0 {
|
||||
return "This account isn't part of any team any more."
|
||||
}
|
||||
return ""
|
||||
}
|
||||
if _, err := users.MembershipOf(s.DB, s.team(), u.ID); err != nil {
|
||||
return "This account isn't part of the team any more. Ask an admin if you need it again."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user