Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
Feat/add admin check (#11050)
Dr.MerdanBay41772c325f71
diff --git a/api/models/account.py b/api/models/account.pyindex 6684e8dd6ec..18be4be036a 100644--- a/api/models/account.py+++ b/api/models/account.py@@ -108,6 +108,10 @@ class Account(UserMixin, db.Model):def is_admin_or_owner(self):return TenantAccountRole.is_privileged_role(self._current_tenant.current_role)+ @property+ def is_admin(self):+ return TenantAccountRole.is_admin_role(self._current_tenant.current_role)+@propertydef is_editor(self):return TenantAccountRole.is_editing_role(self._current_tenant.current_role)@@ -147,6 +151,10 @@ class TenantAccountRole(enum.StrEnum):def is_privileged_role(role: str) -> bool:return role and role in {TenantAccountRole.OWNER, TenantAccountRole.ADMIN}+ @staticmethod+ def is_admin_role(role: str) -> bool:+ return role and role == TenantAccountRole.ADMIN+@staticmethoddef is_non_owner_role(role: str) -> bool:return role and role in {