#NEWLINE# def check_instance_permission( self , request , inst , mode ) : #NEWLINE# #INDENT# return ( request . user . profile . has_permission ( inst , mode = mode ) or request . user . profile . is_admin ( 'treeio_services' ) )