Repository navigation
Check pool ownership and take new owners from the caller's org - #417
Merged
Merged
Conversation
Signed-off-by: Priyanshu-u07 <connect.priyanshu8271@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pool routes now act only on pools that belong to the caller's organisation, and new pools and deployments are recorded under that organisation.
pool/{id},list/pool/{id}/inventory,listDeployments/{id},updatepool,stoppool,deletepoolandDELETE pool/{id}answer 404 for a pool outside the caller's org, before any work. System pools belong to no org.listPoolslists the caller's org; the org in the path is ignored, and a caller with no org gets an empty list.createpoolalways records the caller's org as the owner, whatever the body says, and refuses a caller with no org (403).deployrecords the caller's org on the deployment, whatever the body says, refuses a caller with no org (403), and only targets the caller's own pools.owner_typewith"org", a value never stored. It now uses the same owner types as the ownership check.Until the CLI follow-up lands, CLI pool commands need
--org-id.Tests cover each route for another org, an empty org, "None", no org, the owning org and a system pool; the cross-org cases fail on main. Verified on a local stack, including the CLI's no-org path and the dashboard's pool and deployment pages.