billing: Add Realm.seat_limit.

Currently unenforced, and will mostly need to be set by hand.
This commit is contained in:
Rishi Gupta 2018-11-19 20:44:11 -08:00 committed by Tim Abbott
parent 2fb1e51d71
commit 6b637428a7
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-11-20 04:43
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('zerver', '0190_cleanup_pushdevicetoken'),
]
operations = [
migrations.AddField(
model_name='realm',
name='seat_limit',
field=models.PositiveIntegerField(null=True),
),
]

View File

@ -291,6 +291,7 @@ class Realm(models.Model):
]
has_seat_based_plan = models.BooleanField(default=False) # type: bool
seat_limit = models.PositiveIntegerField(null=True) # type: Optional[int]
def authentication_methods_dict(self) -> Dict[str, bool]:
"""Returns the a mapping from authentication flags to their status,