feat(invitations): accept invitations with C4 consent and contact grants; share the E0 quota across holdings
This commit is contained in:
1 parent
a5990d3fc6
commit
676b3c6e24
59 files changed
+4926
-194
No files matched your search
@@ -18,10 +18,21 @@ var (
|
||||
ErrCompanyQuotaDenied = errors.New("company quota denied")
|
||||
)
|
||||
|
||||
// SharesHoldingPool reports whether the usage of an organization at this tier
|
||||
// is counted in the pool of its holding instead of its own. Only the
|
||||
// unverified tier E0 shares a pool: the organizations of one holding at E0
|
||||
// draw on one allowance, so creating more of them does not multiply it. A
|
||||
// verified tier keeps its own pool, and usage of any organization that is no
|
||||
// longer E0 leaves the shared pool.
|
||||
func (tier OrganizationTier) SharesHoldingPool() bool {
|
||||
return tier == OrganizationTierE0
|
||||
}
|
||||
|
||||
// CompanyQuota is an immutable snapshot of the limits that apply to one
|
||||
// organization at one instant. It carries the stored verification and
|
||||
// effective policy identities so the transactional repository can verify
|
||||
// that neither changed before it reserves usage.
|
||||
// that neither changed before it reserves usage. Its usage scope is the
|
||||
// organization, or the holding pool for a tier that SharesHoldingPool.
|
||||
type CompanyQuota struct {
|
||||
organizationID uuid.UUID
|
||||
policyVersionID PolicyVersionID
|
||||
|
||||
Reference in new issue
Block a user