Commit b044f7b
feat: Extension Resources Group Ownership (#276)
* feat: add owner_id to system_extension_resources and implement ownership checks
- Added owner_id column to system_extension_resources table with foreign key reference to groups.
- Updated Group model to include relationships for OwnerSystemExtensionResources.
- Implemented methods for managing ownership of system extension resources in Group and SystemExtensionResource models.
- Enhanced authorization middleware to check for resource ownership based on the new owner_id field.
- Refactored createSystemExtensionResource to handle owner assignment and validation.
- Updated tests to cover new ownership logic and ensure correct error handling for scope violations.
Signed-off-by: Bailin He <bahe@equinix.com>
* feat: add resource_version to system_extension_resources and update related logic
Signed-off-by: Bailin He <bahe@equinix.com>
* feat: implement extension resource management with ownership and versioning
Signed-off-by: Bailin He <bahe@equinix.com>
* feat: refactor extension resource management to support new routing and ownership features
- Updated routes for creating and updating extension resources to remove URI parameters.
- Implemented ownership checks and resource versioning in extension resource creation and update logic.
- Enhanced test cases to reflect changes in API structure and validation.
Signed-off-by: Bailin He <bahe@equinix.com>
* feat: add create and update request schemas for extension resources and update related paths
Signed-off-by: Bailin He <bahe@equinix.com>
* rename functions
Signed-off-by: Bailin He <bahe@equinix.com>
* feat: add Create and Update methods for extension resources with error handling
Signed-off-by: Bailin He <bahe@equinix.com>
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat: enhance request body handling in middleware for extension resource authorization
Signed-off-by: Bailin He <bahe@equinix.com>
* refactor: rename tracing span for create and update system extension resource functions
Signed-off-by: Bailin He <bahe@equinix.com>
* feat: improve request body handling in middleware for extension resource retrieval
Signed-off-by: Bailin He <bahe@equinix.com>
---------
Signed-off-by: Bailin He <bahe@equinix.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent ea401c3 commit b044f7b
20 files changed
Lines changed: 2135 additions & 1015 deletions
File tree
- db/psql/migrations
- internal/models/psql
- openapi/v1alpha1
- components
- schemas
- paths
- pkg
- api/v1alpha1
- client
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments