Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Enable / disable user #376

Closed
replicaJunction opened this issue Aug 21, 2019 · 2 comments
Closed

Feature: Enable / disable user #376

replicaJunction opened this issue Aug 21, 2019 · 2 comments

Comments

@replicaJunction
Copy link
Collaborator

Context

Is your feature request related to a problem? Please describe.

Way back in #1, I mentioned that it was not possible to set users as active vs. inactive via the REST API. To my surprise, the Atlassian issue I've been tracking for years has been updated, and they've finally added support for this in JIRA 8.3.0.

Since it is now possible to manage this via REST, we should add support for it in this project.

Description

Describe the solution you'd like

  • Add a new parameter for Set-JiraUser: -Enabled [bool]
  • If the parameter is provided, add active: [true | false] to the body of the REST endpoint
  • If the parameter is not provided, do not change the user's active state

Additional Information

Atlassian's doc on the user endpoint contains the active property.

I have not tested this myself, as I don't have access to a new enough JIRA environment to play with.

I don't recommend doing a check of the JIRA server version before trying to set this property, as that would negatively impact performance. Instead, this would just be a "user beware" feature that is marked in the documentation as not usable on versions of JIRA older than 8.3.0.

This should also be a pretty simple change for anyone looking to get their feet wet contributing to the project.

@lipkau
Copy link
Member

lipkau commented Aug 21, 2019

excellent contribution. thank you.
I am looking forward to your future contributions.
xD

I don't have access to a new enough JIRA environment to play with.

Lies! you have access to powershell.atlassian.net ;-)

@johnheusinger
Copy link
Member

Since the API and Jira web interface refer to active/inactive language rather than enabled/disabled, what are your thoughts on naming the parameter -Active rather than -Enabled?

In any case I'd like to take care of this issue 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants