Skip to content

Add ActionCable connection identification#22

Merged
dadachi merged 2 commits intomainfrom
connection_identification
Mar 11, 2026
Merged

Add ActionCable connection identification#22
dadachi merged 2 commits intomainfrom
connection_identification

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented Mar 11, 2026

Summary

  • Add identified_by :current_shopkeeper, :current_account to ActionCable connection using warden session lookup
  • Anonymous WebSocket connections remain allowed for public display pages (no reject_unauthorized_connection)
  • Document convention for future authenticated channels to reject in #subscribed
  • Add connection tests for both anonymous and authenticated scenarios

Test plan

  • bin/rails test test/channels/application_cable/connection_test.rb — new tests pass
  • bin/rubocop — no style violations
  • bin/brakeman — no security warnings
  • bin/rails test — full test suite passes (336 tests, 0 failures)
  • Verify display pages still load and update via Turbo Streams in development

🤖 Generated with Claude Code

dadachi and others added 2 commits March 12, 2026 07:45
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dadachi dadachi merged commit c4f0d40 into main Mar 11, 2026
3 checks passed
@dadachi dadachi deleted the connection_identification branch March 11, 2026 23:47
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.

1 participant