Rename site setting to allow_staff_to_tag_pms from allow_staff_to_tag_in_pm

This commit is contained in:
Vinoth Kannan 2018-02-22 06:48:34 +05:30
parent 2b509eaa91
commit 84867c1c07
4 changed files with 5 additions and 5 deletions

View File

@ -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."

View File

@ -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

View File

@ -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?

View File

@ -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)