#NEWLINE# @ must_be_logged_in #NEWLINE# @ must_have_addon ( 'twofactor' , 'user' ) #NEWLINE# def twofactor_disable( auth , * args , **kwargs ) : #NEWLINE# #INDENT# if auth . user . delete_addon ( 'twofactor' , auth = kwargs ) : #NEWLINE# #INDENT# auth . user . save ( ) #NEWLINE# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise HTTPError ( http . INTERNAL_SERVER_ERROR , data = dict ( message_long = 'Could not disable two-factor at this time' ) )