#NEWLINE# def reject( self , by ) : #NEWLINE# #INDENT# role = self . team . role_for ( by ) #NEWLINE# if ( role in [ Membership . ROLE_MANAGER , Membership . ROLE_OWNER ] ) : #NEWLINE# #INDENT# if ( self . state == Membership . STATE_APPLIED ) : #NEWLINE# #INDENT# self . state = Membership . STATE_REJECTED #NEWLINE# self . save ( ) #NEWLINE# signals . rejected_membership . send ( sender = self , membership = self ) #NEWLINE# return True #NEWLINE# #UNINDENT# #UNINDENT# return False