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.ymlindex 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.ymlindex abb5d65dd56..c692b9887d3 100644--- a/config/site_settings.yml+++ b/config/site_settings.yml@@ -1571,7 +1571,7 @@ tags:type: listclient: truedefault: ''- allow_staff_to_tag_in_pm:+ allow_staff_to_tag_pms:default: falsesuppress_overlapping_tags_in_list:default: falsediff --git a/lib/guardian/tag_guardian.rb b/lib/guardian/tag_guardian.rbindex 8f60c8223c3..84856d4d152 100644--- a/lib/guardian/tag_guardian.rb+++ b/lib/guardian/tag_guardian.rb@@ -9,7 +9,7 @@ module TagGuardianenddef 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_pmsenddef can_admin_tags?diff --git a/spec/serializers/topic_view_serializer_spec.rb b/spec/serializers/topic_view_serializer_spec.rbindex 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 dodescribe 'when tags added to private message topics' dobefore doSiteSetting.tagging_enabled = true- SiteSetting.allow_staff_to_tag_in_pm = true+ SiteSetting.allow_staff_to_tag_pms = trueendit "should not include the tag for normal users" do@@ -97,7 +97,7 @@ describe TopicViewSerializer doendit "should not include the tag if pm tags disabled" do- SiteSetting.allow_staff_to_tag_in_pm = false+ SiteSetting.allow_staff_to_tag_pms = falsejson = serialize_topic(pm, moderator)expect(json[:tags]).to eq(nil)