Skip to content

Persist media rotation for any user, not just admins - #646

Merged
ddon merged 2 commits into
BeamLabEU:mainfrom
alexdont:main
Jul 18, 2026
Merged

Persist media rotation for any user, not just admins#646
ddon merged 2 commits into
BeamLabEU:mainfrom
alexdont:main

Conversation

@alexdont

Copy link
Copy Markdown
Contributor

Summary

  • Rotation is the file's shared orientation (metadata["rotation"]) — every viewer sees it — so gating the write on admin context was arbitrary. A non-admin who could open and rotate a file in an embedded browser saw the turn but it never stuck. The media browser popup now passes persist_rotation unconditionally (the detail page already did). The Details link stays admin-only; it targets the admin page.
  • Layering note: Fresco already owns the mechanism (the persist_rotation attr + fresco:rotate bridge, shipped in fresco 0.9.0). This change is purely phoenix_kit's policy on top of it — who may persist, and to where (the file's DB row). Nothing to push into Fresco.

Also

Test plan

🤖 Generated with Claude Code

https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL

Alexander Don and others added 2 commits July 18, 2026 21:10
The rotation saved to a file is its shared orientation (metadata
["rotation"]) — every viewer sees it — so gating the write on admin
context was arbitrary: a non-admin who could open and rotate a file in
an embedded browser saw the turn but it never stuck. The browser popup
now passes persist_rotation unconditionally (the detail page already
did). The Details link stays admin-only; it targets the admin page.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL
Credo --strict flagged three fully-qualified Phoenix.LiveView.Lifecycle
calls (nested-module-alias suggestion) from PR BeamLabEU#643, which turned
mix precommit red. Alias it at the top and use the short form.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL
@ddon
ddon merged commit 8d4902d into BeamLabEU:main Jul 18, 2026
ddon pushed a commit that referenced this pull request Jul 18, 2026
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants