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:
Isaac Janzen
2022-05-10 10:02:28 -05:00
committed by GitHub
parent cf273ec6e0
commit 1a12e4cfc8
17 changed files with 103 additions and 38 deletions

View File

@@ -1438,7 +1438,7 @@ describe PostAlerter do
before do
SiteSetting.tagging_enabled = true
SiteSetting.allow_staff_to_tag_pms = true
SiteSetting.pm_tags_allowed_for_groups = "1|2|3"
Jobs.run_immediately!
TopicUser.change(user.id, post.topic.id, notification_level: TopicUser.notification_levels[:watching])
TopicUser.change(staged.id, post.topic.id, notification_level: TopicUser.notification_levels[:watching])