#NEWLINE# def clean_destination_domain( self ) : #NEWLINE# #INDENT# if ( 'destination_domain' in self . cleaned_data ) : #NEWLINE# #INDENT# destination = self . cleaned_data [ 'destination_domain' ] #NEWLINE# if ( ( not self . couch_user ) or ( not self . couch_user . has_permission ( destination , Permissions . edit_data ) ) ) : #NEWLINE# #INDENT# raise ValidationError ( 'You do not have permission to copy indicators to this project space.' ) #NEWLINE# #UNINDENT# if ( destination not in self . available_domains ) : #NEWLINE# #INDENT# raise ValidationError ( 'You submitted an invalid destination project space' ) #NEWLINE# #UNINDENT# return destination