Add read-only public sharing for scenarios#80
Merged
Conversation
Let scenario owners generate a revocable public link that renders a read-only summary of their giving plan (name, totals, allocation breakdown, chart, owner attribution) at /public/scenarios/:token with no login required. Sharing is off by default and managed from a Share modal opened via a button aligned with the scenario name; disabling the link makes it 404. Also defaults integration tests to the tenant host in test_helper to remove repeated host! calls. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scenario owners can now generate a revocable public link that renders a read-only summary of their giving plan (name, totals, allocation breakdown with chart, and owner attribution) at
/public/scenarios/:tokenwith no login required and scoped to the org subdomain for tenant isolation. Sharing is off by default and managed from a Share modal opened via a button aligned with the scenario name, where the owner can create, copy, regenerate, or stop the link; disabling makes the old link 404. The already read-only "Summary" panel was extracted into a shared partial reused by both the authenticated page and the public view. Adds ashare_tokencolumn plus enable/regenerate/disable model methods, a namespacedpublic/scenarioscontroller, ascenarios/shareresource, and a small clipboard Stimulus controller. Also defaults integration tests to the tenant host intest_helper.rb, removing repeatedhost!calls across controller tests.🤖 Generated with Claude Code