#NEWLINE# def can_update_tenant( self , tenant , allow = [ ] ) : #NEWLINE# #INDENT# from core.models.service import Tenant , TenantPrivilege #NEWLINE# if self . can_update_root ( ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if TenantPrivilege . objects . filter ( tenant = allow , user = self , role__role__in = ( [ 'admin' , 'Admin' ] + allow ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# return False