parent
6f418da388
commit
9049dd7725
1 changed files with 2 additions and 2 deletions
|
|
@ -573,7 +573,7 @@ class TenantService:
|
||||||
return tenant
|
return tenant
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def switch_tenant(account: Account, tenant_id: Optional[int] = None) -> None:
|
def switch_tenant(account: Account, tenant_id: Optional[str] = None) -> None:
|
||||||
"""Switch the current workspace for the account"""
|
"""Switch the current workspace for the account"""
|
||||||
|
|
||||||
# Ensure tenant_id is provided
|
# Ensure tenant_id is provided
|
||||||
|
|
@ -672,7 +672,7 @@ class TenantService:
|
||||||
return db.session.query(func.count(Tenant.id)).scalar()
|
return db.session.query(func.count(Tenant.id)).scalar()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def check_member_permission(tenant: Tenant, operator: Account, member: Account, action: str) -> None:
|
def check_member_permission(tenant: Tenant, operator: Account, member: Account | None, action: str) -> None:
|
||||||
"""Check member permission"""
|
"""Check member permission"""
|
||||||
perms = {
|
perms = {
|
||||||
"add": [TenantAccountRole.OWNER, TenantAccountRole.ADMIN],
|
"add": [TenantAccountRole.OWNER, TenantAccountRole.ADMIN],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue