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

feat(organizations): update organizations endpoint to block post and delete requests TASK-964 #5274

Open
wants to merge 3 commits into
base: task-963-create-endpoints-to-handle-org-members
Choose a base branch
from

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

Restricted POST and DELETE methods for organizations endpoint to prevent unintended changes.

📖 Description

Previously, the organizations endpoint allowed POST and DELETE requests, which could lead to accidental changes or deletions. This update restricts these methods, ensuring that organizations data remains intact and secure.

👀 Preview steps

  • Send a GET request to the organizations endpoint to retrieve a list of organizations.
  • Attempt to send a POST request to create a new organization (this should fail).
  • Attempt to send a DELETE request to delete an existing organization (this should fail).
  • Send a PATCH request to update an existing organization (this should succeed).

💭 Notes

  • This change is a security enhancement to prevent accidental or malicious modifications to organizations data.
  • Tests have been updated to reflect the new behaviour.

@rajpatel24 rajpatel24 removed the request for review from jnm November 18, 2024 08:19
@rajpatel24 rajpatel24 self-assigned this Nov 18, 2024
@rajpatel24 rajpatel24 changed the title feat(organizations): update organizations endpoint to block post and delete requests feat(organizations): update organizations endpoint to block post and delete requests TASK-964 Nov 18, 2024
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.

1 participant