File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,10 @@ def get_integrates(self) -> list[db.Model]:
108108 def is_admin_or_owner (self ):
109109 return TenantAccountRole .is_privileged_role (self ._current_tenant .current_role )
110110
111+ @property
112+ def is_admin (self ):
113+ return TenantAccountRole .is_admin_role (self ._current_tenant .current_role )
114+
111115 @property
112116 def is_editor (self ):
113117 return TenantAccountRole .is_editing_role (self ._current_tenant .current_role )
@@ -147,6 +151,10 @@ def is_valid_role(role: str) -> bool:
147151 def is_privileged_role (role : str ) -> bool :
148152 return role and role in {TenantAccountRole .OWNER , TenantAccountRole .ADMIN }
149153
154+ @staticmethod
155+ def is_admin_role (role : str ) -> bool :
156+ return role and role == TenantAccountRole .ADMIN
157+
150158 @staticmethod
151159 def is_non_owner_role (role : str ) -> bool :
152160 return role and role in {
You can’t perform that action at this time.
0 commit comments