You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a small script to periodically audit our Jira users. Nothing fancy - just pull a list of active users, check their email in our AD, and if they are terminated there, make their accounts inactive.
I'm having some real problems understanding how to use _gain_sudo_session - because it seems it's not documented anywhere.
I checked in the docs here Read The Docs: JIRA but there is no mention of _gain_sudo_session.
I've read through some of the bug reports that mention it - but they weren't any help.
Python 3.8
jira==3.4.1
JIRA Version: 8.20 Data Center / Also have a Docker Image that is Jira Server 9.5 which I use for testing on my local system.
When I run that code on JIRA 8.20 it causes an application error. When I run it against Server 9.5 - nothing happens.
On the error it spits back a massive HTML response, but the basics of the error are:
Cause
Referer URL: Unknown
java.lang.NullPointerException
This might be a known bug with this version, and is patched in newer version - Would explain why this isn't throwing any errors in version 9.5
I also tried Basic Auth (Username + Password) instead of token, which had the same result (Error in 8.2, and nothing happens in 9.5)
I think I just don't understand the _gain_sudo_session function well enough. Can anyone help me understand what I need to do?
Small update; while testing with jirashell - actually i discovered it was set_user_inactive that was causing the JIRA instance to error out
not the _gain_sudo_session function. My bad :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey all,
I'm writing a small script to periodically audit our Jira users. Nothing fancy - just pull a list of active users, check their email in our AD, and if they are terminated there, make their accounts inactive.
I'm having some real problems understanding how to use _gain_sudo_session - because it seems it's not documented anywhere.
I checked in the docs here Read The Docs: JIRA but there is no mention of _gain_sudo_session.
I've read through some of the bug reports that mention it - but they weren't any help.
Python 3.8
jira==3.4.1
JIRA Version: 8.20 Data Center / Also have a Docker Image that is Jira Server 9.5 which I use for testing on my local system.
Here's an example of what I'm trying to do:
When I run that code on JIRA 8.20 it causes an application error. When I run it against Server 9.5 - nothing happens.
On the error it spits back a massive HTML response, but the basics of the error are:
This might be a known bug with this version, and is patched in newer version - Would explain why this isn't throwing any errors in version 9.5
I also tried Basic Auth (Username + Password) instead of token, which had the same result (Error in 8.2, and nothing happens in 9.5)
I think I just don't understand the _gain_sudo_session function well enough. Can anyone help me understand what I need to do?
Small update; while testing with jirashell - actually i discovered it was set_user_inactive that was causing the JIRA instance to error out
not the _gain_sudo_session function. My bad :)
Beta Was this translation helpful? Give feedback.
All reactions