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

fix(organization)!: restrict invite details to the user's current organization TASK-1590 #5540

Conversation

rajpatel24
Copy link
Contributor

🗒️ Checklist

  1. run linter locally
  2. update all related docs (API, README, inline, etc.), if any
  3. draft PR with a title <type>(<scope>)<!>: <title> TASK-1234
  4. tag PR: at least frontend or backend unless it's global
  5. fill in the template below and delete template comments
  6. review thyself: read the diff and repro the preview as written
  7. open PR & confirm that CI passes
  8. request reviewers, if needed
  9. delete this section before merging

📣 Summary

Updated the members API endpoint to ensure invite details are only available for the organization a user currently belongs to.

📖 Description

Previously, the members API endpoint could display invite details from a user's past organization, even after they joined a new one. This update ensures that:

  • Invite details are only shown if the user is still part of the organization.
  • If a user is removed from an organization, their invite details for that organization will no longer be visible.
  • If the user joins a different organization, invite details from the previous organization will not be carried over.

This change improves data consistency and ensures that invite details are relevant only within the organization where the user is currently a member.

@rajpatel24 rajpatel24 removed the request for review from jnm February 19, 2025 13:06
@rajpatel24 rajpatel24 self-assigned this Feb 19, 2025
@rajpatel24 rajpatel24 force-pushed the task-1590-fix-members-endpoint-to-remove-invite-details-for-removed-users branch from eb214a4 to 45eef95 Compare February 19, 2025 13:20
@rajpatel24 rajpatel24 force-pushed the task-1590-fix-members-endpoint-to-remove-invite-details-for-removed-users branch from 45eef95 to ab7a541 Compare February 19, 2025 13:30
@rajpatel24 rajpatel24 changed the title fix(organization)!: restrict invite details to the user's current organization fix(organization)!: restrict invite details to the user's current organization TASK-1590 Feb 19, 2025
…-for-removed-users' of github.com:kobotoolbox/kpi into task-1590-fix-members-endpoint-to-remove-invite-details-for-removed-users
@noliveleger noliveleger changed the base branch from main to release/2.023.04 February 20, 2025 08:44
@noliveleger noliveleger changed the base branch from release/2.023.04 to main February 20, 2025 08:44
Copy link
Contributor

@noliveleger noliveleger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rajpatel24 rajpatel24 merged commit 7f621df into main Feb 20, 2025
5 checks passed
@rajpatel24 rajpatel24 deleted the task-1590-fix-members-endpoint-to-remove-invite-details-for-removed-users branch February 20, 2025 09:01
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