Skip to content

Secure the uSync API with the uSync section policy - #1157

Merged
KevinJump merged 1 commit into
v18/mainfrom
fix/usync-api-section-policy
Oct 28, 2026
Merged

KevinJump merged 1 commit into
v18/mainfrom
fix/usync-api-section-policy

Conversation

@KevinJump

Copy link
Copy Markdown
Member

The management API base controller was decorated with SectionAccessContent (from 0ef52b9), with the TreeAccessuSync policy commented out. That meant:

  • any user with the Content section could call the uSync API (import, export, etc.)
  • a user with only the uSync section got 403s

This restores [Authorize(Policy = SyncAuthorizationPolicies.TreeAccessuSync)] (Settings section or the usync.section), matching v17, and drops the now-unused Umbraco.Cms.Web.Common.Authorization using.

Same change as the v19 fix in #1156, which was tested on a v19 site: Content-only users get 403, Settings or uSync-section users get 200. Not yet tested on a v18 site.

🤖 Generated with Claude Code

The base controller used SectionAccessContent, so any user with the
Content section could call the uSync API, and a user with only the
uSync section got 403s. Go back to TreeAccessuSync (Settings or the
uSync section), which is what v17 uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/18.2.1 uSync 18.2.1 release

Development

Successfully merging this pull request may close these issues.

1 participant