File tree 1 file changed +8
-0
lines changed
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]:
108
108
def is_admin_or_owner (self ):
109
109
return TenantAccountRole .is_privileged_role (self ._current_tenant .current_role )
110
110
111
+ @property
112
+ def is_admin (self ):
113
+ return TenantAccountRole .is_admin_role (self ._current_tenant .current_role )
114
+
111
115
@property
112
116
def is_editor (self ):
113
117
return TenantAccountRole .is_editing_role (self ._current_tenant .current_role )
@@ -147,6 +151,10 @@ def is_valid_role(role: str) -> bool:
147
151
def is_privileged_role (role : str ) -> bool :
148
152
return role and role in {TenantAccountRole .OWNER , TenantAccountRole .ADMIN }
149
153
154
+ @staticmethod
155
+ def is_admin_role (role : str ) -> bool :
156
+ return role and role == TenantAccountRole .ADMIN
157
+
150
158
@staticmethod
151
159
def is_non_owner_role (role : str ) -> bool :
152
160
return role and role in {
You can’t perform that action at this time.
0 commit comments