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

Added restore functionality to user API #10111

Merged

Conversation

Delta5
Copy link
Contributor

@Delta5 Delta5 commented Sep 21, 2021

Description

Code adds the ability to restore a deleted user through the API. This supports a use-case where we delete users when they are no longer active but would like to restore them if they return to the organization. Code was copied from the asset restore API endpoint and modified for the user controller.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Tests were run on the API endpoint within the dev environment using Postman to make the necessary API calls.

  • Create a user and delete it through web UI. Restore the user via the API and verify the user is no longer marked as deleted
  • Create a user and delete it through the API. Restore the user via the API and verify the user is no longer marked as deleted

Test Configuration:

  • PHP version: 7.4
  • MySQL version: 8.0.26
  • Webserver version: Apache 2.4.41
  • OS version: Ubuntu 20.04.3

Checklist:

@Delta5 Delta5 requested a review from snipe as a code owner September 21, 2021 20:01
@welcome
Copy link

welcome bot commented Sep 21, 2021

💖 Thanks for this pull request! 💖

We use semantic commit messages to streamline the release process and easily generate changelogs between versions. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix if it doesn't have one already.

Examples of commit messages with semantic prefixes:

  • Fixed #<issue number>: don't overwrite prevent_default if default wasn't prevented
  • Added #<issue number>: add checkout functionality to assets
  • Improved Asset Checkout: use new notification method for checkout

Things that will help get your PR across the finish line:

  • Document any user-facing changes you've made.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@snipe
Copy link
Owner

snipe commented Sep 22, 2021

Looks great, thanks!

@snipe snipe merged commit df1b1bc into snipe:develop-v6-integration Sep 22, 2021
@welcome
Copy link

welcome bot commented Sep 22, 2021

Congrats on merging your first pull request! 🎉🎉🎉

@Delta5 Delta5 deleted the add-restore-user-api-endpoint branch September 22, 2021 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants