@@ -638,11 +638,10 @@ def add_attachment(self, issue_key, filename):
638638 :param filename: str, name, if file in current directory or full path to file
639639 """
640640 log .warning ('Adding attachment...' )
641- headers = {'X-Atlassian-Token' : 'no-check' }
642641 url = 'rest/api/2/issue/{}/attachments' .format (issue_key )
643642 with open (filename , 'rb' ) as attachment :
644643 files = {'file' : attachment }
645- return self .post (url , headers = headers , files = files )
644+ return self .post (url , headers = self . no_check_headers , files = files )
646645
647646 def get_server_info (self , do_health_check = False ):
648647 """
@@ -872,7 +871,6 @@ def user_disable_throw_rest_endpoint(self, username, url='rest/scriptrunner/late
872871 def user_get_websudo (self ):
873872 """ Get web sudo cookies using normal http request"""
874873 url = 'secure/admin/WebSudoAuthenticate.jspa'
875- headers = self .form_token_headers
876874 data = {
877875 'webSudoPassword' : self .password ,
878876 'webSudoIsPost' : 'false' ,
@@ -886,7 +884,7 @@ def user_get_websudo(self):
886884 if atl_token :
887885 data ['atl_token' ] = atl_token
888886
889- return self .post (path = url , data = data , headers = headers )
887+ return self .post (path = url , data = data , headers = self . form_token_headers )
890888
891889 def invalidate_websudo (self ):
892890 """
@@ -1843,12 +1841,8 @@ def delete_plugin(self, plugin_key):
18431841 return self .delete (url )
18441842
18451843 def check_plugin_manager_status (self ):
1846- headers = {
1847- 'X-Atlassian-Token' : 'nocheck' ,
1848- 'Content-Type' : 'application/vnd.atl.plugins.safe.mode.flag+json'
1849- }
18501844 url = 'rest/plugins/latest/safe-mode'
1851- return self .request (method = 'GET' , path = url , headers = headers )
1845+ return self .request (method = 'GET' , path = url , headers = self . safe_mode_headers )
18521846
18531847 def get_all_permissionschemes (self , expand = None ):
18541848 """
0 commit comments