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

Implement endpoint to enable a user #44

Closed
viktorKhan opened this issue Jan 16, 2024 · 0 comments · Fixed by #48
Closed

Implement endpoint to enable a user #44

viktorKhan opened this issue Jan 16, 2024 · 0 comments · Fixed by #48
Assignees
Labels
enhancement New feature or request

Comments

@viktorKhan
Copy link
Contributor

viktorKhan commented Jan 16, 2024

Acceptance Criteria for User Enablement Endpoint

  1. Authentication and Authorization:

    • The endpoint should require proper authentication.
    • Only authorized users or administrators should be able to enable a user.
    • Unauthorized attempts to enable a user should result in an error response.
  2. Endpoint URL and Method:

    • The endpoint URL and HTTP method should be POST /api/v1/users/{userId}/enable
  3. User Existence:

    • If the specified user ID exists, the user should be enabled successfully.
    • If the user ID does not exist, the endpoint should return a 400 error.
  4. Enablement Status:

    • Enabling a user should update their status to indicate that they are enabled.
    • Subsequent attempts to authenticate the enabled user should succeed.
  5. Response Status Code:

    • A successful enablement should return a 200 OK status code.
    • Handle other potential errors with appropriate status codes (e.g., 401 Unauthorized, 403 Forbidden).
  6. Response Body:

    • A successful enablement must not return a response body.
    • Error responses should include clear and informative messages.
  7. Data Consistency:

    • Ensure that enabling a user does not result in data loss.
    • Associated data should remain intact, and business rules for enabled users should be applied.
@viktorKhan viktorKhan added the enhancement New feature or request label Jan 16, 2024
@viktorKhan viktorKhan self-assigned this Jan 16, 2024
@viktorKhan viktorKhan linked a pull request Jan 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant