Skip to content

Commit

Permalink
DEV: Don't remove trust level group memberships from system user
Browse files Browse the repository at this point in the history
  • Loading branch information
Drenmi committed Jan 26, 2024
1 parent 667b62c commit 22b21a9
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion spec/integration/category_tag_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def filter_allowed_tags(opts = {})
let(:tag_with_colon) { Fabricate(:tag, name: "with:colon") }

fab!(:user)
fab!(:admin)
fab!(:admin) { Fabricate(:admin, refresh_auto_groups: true) }

before do
SiteSetting.tagging_enabled = true
Expand Down
2 changes: 0 additions & 2 deletions spec/lib/new_post_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,6 @@ def build_manager_with(raw)
SiteSetting.create_tag_allowed_groups = Group::AUTO_GROUPS[:trust_level_0]
SiteSetting.tag_topic_allowed_groups = Group::AUTO_GROUPS[:trust_level_0]

Group.user_trust_level_change!(Discourse.system_user.id, Discourse.system_user.trust_level)

manager =
NewPostManager.new(
topic.user,
Expand Down
2 changes: 0 additions & 2 deletions spec/lib/topic_creator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@
)
end

before { Discourse.system_user.change_trust_level!(TrustLevel[4]) }

it "adds watched words as tags" do
topic =
TopicCreator.create(
Expand Down
4 changes: 2 additions & 2 deletions spec/models/tag_user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def watching
end

describe "integration" do
fab!(:user)
fab!(:user) { Fabricate(:user, refresh_auto_groups: true) }
fab!(:watched_tag) { Fabricate(:tag) }
let(:muted_tag) { Fabricate(:tag) }
fab!(:tracked_tag) { Fabricate(:tag) }
Expand Down Expand Up @@ -311,7 +311,7 @@ def watching
end

it "correctly handles staff tags" do
staff = Fabricate(:admin)
staff = Fabricate(:admin, refresh_auto_groups: true)
topic = create_post.topic

create_staff_only_tags(["foo"])
Expand Down
2 changes: 1 addition & 1 deletion spec/models/topic_tracking_state_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

RSpec.describe TopicTrackingState do
fab!(:user)
fab!(:user) { Fabricate(:user, refresh_auto_groups: true) }
fab!(:whisperers_group) { Fabricate(:group) }
fab!(:private_message_post)
let(:private_message_topic) { private_message_post.topic }
Expand Down

0 comments on commit 22b21a9

Please sign in to comment.