AO3-3245 Manually entering the post link for a closed collection gives a misleading error#5504
Merged
Bilka2 merged 6 commits intootwcode:masterfrom Feb 3, 2026
Merged
AO3-3245 Manually entering the post link for a closed collection gives a misleading error#5504Bilka2 merged 6 commits intootwcode:masterfrom
Bilka2 merged 6 commits intootwcode:masterfrom
Conversation
marcus8448
suggested changes
Dec 20, 2025
Member
marcus8448
left a comment
There was a problem hiding this comment.
Thanks for working on this!
added 6 commits
December 27, 2025 13:25
…pdate translation key
Member
Author
|
Updated, thanks for the review marcus! |
marcus8448
approved these changes
Jan 1, 2026
Member
marcus8448
left a comment
There was a problem hiding this comment.
Looks good! Just a minor (non-blocking) potential simplification in the tests.
| context "when collection is closed but user is maintainer" do | ||
| let(:user) { create(:user) } | ||
| let(:collection) { create(:collection, title: "Excalibur", collection_preference: create(:collection_preference, closed: true)) } | ||
| let!(:participant) { collection.collection_participants.create(pseud: user.default_pseud, participant_role: CollectionParticipant::MODERATOR) } |
Member
There was a problem hiding this comment.
If you want to make this a bit more concise (and drop the eager let!) you could create the participant with factorybot and just use participant.user (superseding the user declaration).
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.
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-3245 (Please fill in issue number and remove this comment.)
Purpose
Adds a check in the Works Controller to make sure a Collection isn't closed. If it is, and the User is not Owner or Moderator, it redirects them back to the collection index page with a message.
Credit
Scott (he/him)