mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: Convert min_trust_to_post_links to groups (#25298)
We're changing the implementation of trust levels to use groups. Part of this is to have site settings that reference trust levels use groups instead. It converts the min_trust_to_post_links site setting to post_links_allowed_groups. This isn't used by any of our plugins or themes, so very little fallout.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
# mixin for all guardian methods dealing with post permissions
|
||||
module PostGuardian
|
||||
def unrestricted_link_posting?
|
||||
authenticated? && @user.has_trust_level?(TrustLevel[SiteSetting.min_trust_to_post_links])
|
||||
authenticated? && @user.in_any_groups?(SiteSetting.post_links_allowed_groups_map)
|
||||
end
|
||||
|
||||
def link_posting_access
|
||||
|
Reference in New Issue
Block a user