Skip to content

A platform for community discussion. Free, open, simple.

Rename site setting to allow_staff_to_tag_pms from allow_staff_to_tag_in_pm

Vinoth Kannan84867c1c0743
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index 1fd79670022..747cbf8b1ec 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -1616,7 +1616,7 @@ en:
tags_listed_by_group: "List tags by tag group on the Tags page (/tags)."
tag_style: "Visual style for tag badges."
staff_tags: "A list of tags that can only be applied by staff members"
- allow_staff_to_tag_in_pm: "Allow staff members to tag any personal message"
+ allow_staff_to_tag_pms: "Allow staff members to tag any personal message"
min_trust_level_to_tag_topics: "Minimum trust level required to tag topics"
suppress_overlapping_tags_in_list: "If tags match exact words in topic titles, don't show the tag"
remove_muted_tags_from_latest: "Don't show topics tagged with muted tags in the latest topic list."
diff --git a/config/site_settings.yml b/config/site_settings.yml
index abb5d65dd56..c692b9887d3 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -1571,7 +1571,7 @@ tags:
type: list
client: true
default: ''
- allow_staff_to_tag_in_pm:
+ allow_staff_to_tag_pms:
default: false
suppress_overlapping_tags_in_list:
default: false
diff --git a/lib/guardian/tag_guardian.rb b/lib/guardian/tag_guardian.rb
index 8f60c8223c3..84856d4d152 100644
--- a/lib/guardian/tag_guardian.rb
+++ b/lib/guardian/tag_guardian.rb
@@ -9,7 +9,7 @@ module TagGuardian
end
def can_tag_pms?
- is_staff? && SiteSetting.tagging_enabled && SiteSetting.allow_staff_to_tag_in_pm
+ is_staff? && SiteSetting.tagging_enabled && SiteSetting.allow_staff_to_tag_pms
end
def can_admin_tags?
diff --git a/spec/serializers/topic_view_serializer_spec.rb b/spec/serializers/topic_view_serializer_spec.rb
index 098f7f89d73..772fc15eefb 100644
--- a/spec/serializers/topic_view_serializer_spec.rb
+++ b/spec/serializers/topic_view_serializer_spec.rb
@@ -80,7 +80,7 @@ describe TopicViewSerializer do
describe 'when tags added to private message topics' do
before do
SiteSetting.tagging_enabled = true
- SiteSetting.allow_staff_to_tag_in_pm = true
+ SiteSetting.allow_staff_to_tag_pms = true
end
it "should not include the tag for normal users" do
@@ -97,7 +97,7 @@ describe TopicViewSerializer do
end
it "should not include the tag if pm tags disabled" do
- SiteSetting.allow_staff_to_tag_in_pm = false
+ SiteSetting.allow_staff_to_tag_pms = false
json = serialize_topic(pm, moderator)
expect(json[:tags]).to eq(nil)