Skip to content

Commit

Permalink
Revert "Methods user_deactivate and user_disable revoked."
Browse files Browse the repository at this point in the history
This reverts commit c476ae5.
  • Loading branch information
Ilya Sapunov committed Jun 10, 2019
1 parent c476ae5 commit 7d5ca96
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,29 @@ def user_update_email(self, username, email):
data = {'name': username, 'emailAddress': email}
return self.user_update(username, data=data)

def user_deactivate(self, username):
"""
Disable user
:param username:
:return:
"""
url = 'secure/admin/user/EditUser.jspa'
headers = self.form_token_headers
user = self.user(username)
user_update_info = {
'inline': 'true',
'decorator': 'dialog',
'username': user['name'],
'fullName': user['displayName'],
'email': user['emailAddress'],
'editName': user['name']
}
return self.post(data=user_update_info, path=url, headers=headers)

def user_disable(self, username):
"""Override the disable method"""
return self.user_deactivate(username)

def user_disable_throw_rest_endpoint(self, username, url='rest/scriptrunner/latest/custom/disableUser',
param='userName'):
"""The disable method throw own rest enpoint"""
Expand Down

0 comments on commit 7d5ca96

Please sign in to comment.