{{define "content"}} {{$viewer := .Content.Viewer}} {{$grantable := .Content.Grantable}}

Members

{{range .Content.Members}} {{end}}
MemberRoleStatusActions
{{.Email}}{{if .Name}} ({{.Name}}){{end}} {{.Role.Title}} {{if .Active}}Active{{else}}Removed{{end}} {{if mayActOn $viewer .}} {{/* The role selector is built from Grantable, never from the three role constants. An Admin may grant only Member — idear refuses a grant that is not strictly below the granter's own rank — so a selector offering Admin to an Admin would 403 on every submit, and one offering Owner would 403 for everybody including the Owner. Hiding a control is never the enforcement; the store refuses either way. */}} {{if $grantable}}
{{end}} {{if .Active}}
{{else}}
{{end}} {{end}}
{{if $grantable}}

Invite someone

{{end}} {{with .Content.Invitations}}

Pending invitations

{{end}} {{if .Content.IsOwner}}

Transfer ownership

{{/* The only path to Owner. idear demotes the outgoing Owner and promotes the incoming one in one transaction, so the instance is never left with two Owners or none — and role=owner is refused on every other route, for every actor. */}}
{{end}} {{end}}