mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 02:24:47 +08:00
FEATURE: Introduce site setting to allow for non staff pm tagging (#16671)
Currently the only way to allow tagging on pms is to use the `allow_staff_to_tag_pms` site setting. We are removing that site setting and replacing it with `pm_tags_allowed_for_groups` which will allow for non staff tagging. It will be group based permissions instead of requiring the user to be staff. If the existing value of `allow_staff_to_tag_pms` is `true` then we include the `staff` groups as a default for `pm_tags_allowed_for_groups`.
This commit is contained in:
@ -148,7 +148,7 @@ RSpec.describe ListController do
|
||||
|
||||
before do
|
||||
SiteSetting.tagging_enabled = true
|
||||
SiteSetting.allow_staff_to_tag_pms = true
|
||||
SiteSetting.pm_tags_allowed_for_groups = "1|2|3"
|
||||
Fabricate(:topic_tag, tag: tag, topic: private_message)
|
||||
end
|
||||
|
||||
@ -158,8 +158,8 @@ RSpec.describe ListController do
|
||||
expect(response.status).to eq(404)
|
||||
end
|
||||
|
||||
it 'should fail for staff users if disabled' do
|
||||
SiteSetting.allow_staff_to_tag_pms = false
|
||||
it 'should fail for staff users if empty' do
|
||||
SiteSetting.pm_tags_allowed_for_groups = ""
|
||||
|
||||
[moderator, admin].each do |user|
|
||||
sign_in(user)
|
||||
|
Reference in New Issue
Block a user