This reverts commit 7edf6d86e4
.
This commit is contained in:
parent
7edf6d86e4
commit
3d3f20b68d
|
@ -1,4 +1,3 @@
|
||||||
< 3.2.0.beta4-dev: ad1b7c9608bf32c3a991580347302a071d5902d9
|
|
||||||
< 3.2.0.beta2-dev: 9fbf43e2f077e86f0a1ff769af6036d4e78bfff1
|
< 3.2.0.beta2-dev: 9fbf43e2f077e86f0a1ff769af6036d4e78bfff1
|
||||||
3.1.999: b5d487d6a5bfe2571d936eec5911d02a5f3fcc32
|
3.1.999: b5d487d6a5bfe2571d936eec5911d02a5f3fcc32
|
||||||
3.1.0.beta1: 62fe282c756ac7de43a22a09b0d675882a507743
|
3.1.0.beta1: 62fe282c756ac7de43a22a09b0d675882a507743
|
||||||
|
|
|
@ -703,10 +703,8 @@ SQL
|
||||||
category_id_changes = topic_changes.diff["category_id"].to_a
|
category_id_changes = topic_changes.diff["category_id"].to_a
|
||||||
tag_changes = topic_changes.diff["tags"].to_a
|
tag_changes = topic_changes.diff["tags"].to_a
|
||||||
|
|
||||||
old_allowed =
|
old_allowed = Guardian.new.allow_accepted_answers?(category_id_changes[0], tag_changes[0])
|
||||||
Guardian.basic_user.allow_accepted_answers?(category_id_changes[0], tag_changes[0])
|
new_allowed = Guardian.new.allow_accepted_answers?(category_id_changes[1], tag_changes[1])
|
||||||
new_allowed =
|
|
||||||
Guardian.basic_user.allow_accepted_answers?(category_id_changes[1], tag_changes[1])
|
|
||||||
|
|
||||||
options[:refresh_stream] = true if old_allowed != new_allowed
|
options[:refresh_stream] = true if old_allowed != new_allowed
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@ require_dependency "site"
|
||||||
|
|
||||||
describe Site do
|
describe Site do
|
||||||
let(:category) { Fabricate(:category) }
|
let(:category) { Fabricate(:category) }
|
||||||
let(:guardian) { Guardian.basic_user }
|
let(:guardian) { Guardian.new }
|
||||||
|
|
||||||
before { SiteSetting.show_filter_by_solved_status = true }
|
before { SiteSetting.show_filter_by_solved_status = true }
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ require "rails_helper"
|
||||||
describe TopicAnswerMixin do
|
describe TopicAnswerMixin do
|
||||||
let(:topic) { Fabricate(:topic) }
|
let(:topic) { Fabricate(:topic) }
|
||||||
let(:post) { Fabricate(:post, topic: topic) }
|
let(:post) { Fabricate(:post, topic: topic) }
|
||||||
let(:guardian) { Guardian.basic_user }
|
let(:guardian) { Guardian.new }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
topic.custom_fields["accepted_answer_post_id"] = post.id
|
topic.custom_fields["accepted_answer_post_id"] = post.id
|
||||||
|
|
|
@ -4,7 +4,7 @@ require "rails_helper"
|
||||||
|
|
||||||
describe UserCardSerializer do
|
describe UserCardSerializer do
|
||||||
let(:user) { Fabricate(:user) }
|
let(:user) { Fabricate(:user) }
|
||||||
let(:serializer) { described_class.new(user, scope: Guardian.basic_user, root: false) }
|
let(:serializer) { described_class.new(user, scope: Guardian.new, root: false) }
|
||||||
let(:json) { serializer.as_json }
|
let(:json) { serializer.as_json }
|
||||||
|
|
||||||
it "accepted_answers serializes number of accepted answers" do
|
it "accepted_answers serializes number of accepted answers" do
|
||||||
|
|
Loading…
Reference in New Issue