Feat/enterprise sso (#3602)

This commit is contained in:
Garfield Dai
2024-04-18 17:33:32 +08:00
committed by GitHub
parent d9f1a8ce9f
commit 4481906be2
30 changed files with 518 additions and 21 deletions

View File

@@ -105,6 +105,12 @@ class Account(UserMixin, db.Model):
def is_admin_or_owner(self):
return self._current_tenant.current_role in ['admin', 'owner']
class TenantStatus(str, enum.Enum):
NORMAL = 'normal'
ARCHIVE = 'archive'
class Tenant(db.Model):
__tablename__ = 'tenants'
__table_args__ = (