#NEWLINE# def can_create_project_with( self , customer , project_groups ) : #NEWLINE# #INDENT# user = self . request . user #NEWLINE# if user . is_staff : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if customer . has_user ( user , models . CustomerRole . OWNER ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if ( project_groups and all ( ( project_group . has_user ( user , models . ProjectGroupRole . MANAGER ) for project_group in project_groups ) ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# return False