From afd0e1d6784f6bf123b1fd7b9775fe659c668738 Mon Sep 17 00:00:00 2001 From: Gabriel Shekler <46564521+gs202@users.noreply.github.com> Date: Fri, 29 Nov 2019 12:21:19 +0200 Subject: [PATCH] pass permissions parameter during connection check (#113) --- pytest_jira.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pytest_jira.py b/pytest_jira.py index bcdb926..5f9213e 100644 --- a/pytest_jira.py +++ b/pytest_jira.py @@ -207,7 +207,9 @@ def _jira_request(self, url, method='get', **kwargs): def check_connection(self): # This URL work for both anonymous and logged in users auth_url = '{url}/rest/api/2/mypermissions'.format(url=self.url) - r = self._jira_request(auth_url) + r = self._jira_request( + auth_url, params={'permissions': 'BROWSE_PROJECTS'} + ) # For some reason in case on invalid credentials the status is still # 200 but the body is empty