DEV: Make more group-based settings client: false (#25585)

Affects the following settings:

* whispers_allowed_groups
* anonymous_posting_allowed_groups
* personal_message_enabled_groups
* shared_drafts_allowed_groups
* here_mention_allowed_groups
* uploaded_avatars_allowed_groups
* ignore_allowed_groups

This turns off `client: true` for these group-based settings,
because there is no guarantee that the current user gets all
their group memberships serialized to the client. Better to check
server-side first.
This commit is contained in:
Martin Brennan
2024-02-08 09:43:34 +10:00
committed by GitHub
parent 57c53b0ead
commit adb4eee153
11 changed files with 33 additions and 49 deletions

View File

@ -203,14 +203,6 @@ class SiteSetting < ActiveRecord::Base
SiteSetting::Upload
end
def self.whispers_allowed_group_ids
if SiteSetting.whispers_allowed_groups.present?
SiteSetting.whispers_allowed_groups_map
else
[]
end
end
def self.require_invite_code
invite_code.present?
end