From 90a1406e3e887dce3493b246b53e76c4b72ae1f1 Mon Sep 17 00:00:00 2001
From: weeklies <80141759+weeklies@users.noreply.github.com>
Date: Sun, 21 Apr 2024 22:45:13 +0200
Subject: [PATCH] AO3-6491 Change default comment setting to registered users
only (#4556)
* AO3-6491 Set default comment permissions to users only
* AO3-6491 Fix tests, make sure correct notice is shown to admins
* AO3-6491 Display non-Archive users error to admins on admin posts
* AO3-6491 Don't edit when error notice is shown in commentable
* AO3-6491 Correct feature step to ensure correct error notice
* AO3-6491 Feedback
* AO3-6491 Correct test to not assume guest comments enabled by default
* AO3-6491 Fix CommentsController spec
* AO3-6491 Fix the comments controller spec...
* AO3-6491 A happier Hound
* AO3-6491 Try to fix failing tests
* Tidy and try to fix tests
* AO3-6491 Fix features first
* AO3-6491 Fix and tidy specs
* AO3-6491 Remove wrong trait
* AO3-6491 Step consistency
* AO3-6491 Fix some tests..............
* AO3-6491 hello darkness my old friend
* AO3-6491 plz work?
---
app/models/work.rb | 2 +-
app/views/works/new_import.html.erb | 4 +-
factories/comments.rb | 4 +
factories/works.rb | 4 +
features/admins/admin_settings.feature | 10 +-
.../guest_comment_replies.feature | 6 +-
.../comments_and_kudos/guest_comments.feature | 2 +-
.../comments_and_kudos/hidden_works.feature | 4 +-
.../comments_and_kudos/spam_comments.feature | 4 +-
features/importing/work_import.feature | 1 +
features/step_definitions/comment_steps.rb | 14 +-
features/step_definitions/work_steps.rb | 18 ++
public/help/who-can-comment-on-this-work.html | 4 +-
spec/controllers/comments_controller_spec.rb | 193 ++++++++++--------
14 files changed, 163 insertions(+), 107 deletions(-)
diff --git a/app/models/work.rb b/app/models/work.rb
index da0501e4f98..06fe678cc48 100755
--- a/app/models/work.rb
+++ b/app/models/work.rb
@@ -218,7 +218,7 @@ def new_recipients_have_not_blocked_gift_giver
enable_all: 0,
disable_anon: 1,
disable_all: 2
- }, _suffix: :comments
+ }, _suffix: :comments, _default: 1
########################################################################
# HOOKS
diff --git a/app/views/works/new_import.html.erb b/app/views/works/new_import.html.erb
index 67cc8654a7f..e81a8263b27 100644
--- a/app/views/works/new_import.html.erb
+++ b/app/views/works/new_import.html.erb
@@ -150,11 +150,11 @@