Skip to content

fix: 403 error when get shared skill item metadata #1974 - #1978

Merged
astsiapanay merged 2 commits into
developmentfrom
fix/issue-1974
Sep 14, 2026
Merged

astsiapanay merged 2 commits into
developmentfrom
fix/issue-1974

Conversation

@astsiapanay

Copy link
Copy Markdown
Collaborator

Fixes a bug where a user who accepted a share invitation for a specific skill (not its containing folder) got 403 when requesting that skill's metadata via /v2/metadata/skills/{bucket}/{path}.

Applicable issues

Description of changes

  • The v2 skills metadata route always built its access-check resource with a forced trailing slash (folder shape), so a share recorded against a specific skill item's own (non-folder) url never matched.
  • ControllerSelector now passes both the item-shaped and folder-shaped candidate urls for this route to the controller.
  • ComplexResourceMetadataController checks permissions for both candidates and grants access if either is shared, since the client cannot know in advance whether the requested path names a skill item or a grouping folder.
  • ComplexResourceService.getMetadata now coerces the resource to folder-shape before listing children, since the resource it receives may no longer be folder-shaped for a genuine grouping-folder path.
  • Added testItemShareInheritsMetadataAccess covering the exact bug scenario.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The v2 skills metadata route always built its access-check resource with a
forced trailing slash, so a share recorded against a specific skill item
(non-folder url) never matched. Check both the item-shaped and folder-shaped
candidate urls and grant access if either is shared, since the client cannot
know in advance whether the requested path names an item or a grouping
folder.
@ai-dial-actions

This comment has been minimized.

@ai-dial-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@astsiapanay
astsiapanay merged commit f697bbf into development Sep 14, 2026
9 checks passed
@astsiapanay
astsiapanay deleted the fix/issue-1974 branch September 14, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Assets-Skills] 403 error when get shared skill item metadata

3 participants