mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:45:26 +08:00
UX: Improve naming for anonymous mode settings (#31832)
This PR renames a couple of settings related to anonymous mode: 1. `allow_anonymous_posting` → `allow_anonymous_mode`. This setting is used as a switch for the entire anonymous mode feature, so it makes sense to give it a generic name that better reflects what the setting does. 2. `allow_anonymous_likes` → `allow_likes_in_anonymous_mode`. The new name is clearer and will match a new setting that we'll add to allow anonymous users to post in chat. Internal topic: t/148088.
This commit is contained in:
@ -277,6 +277,13 @@ module SiteSettings::Validations
|
||||
validate_error :tl0_and_anonymous_flag
|
||||
end
|
||||
|
||||
def validate_allow_likes_in_anonymous_mode(new_val)
|
||||
return if new_val == "f"
|
||||
return if SiteSetting.allow_anonymous_mode
|
||||
|
||||
validate_error :allow_likes_in_anonymous_mode_without_anonymous_mode_enabled
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def validate_bucket_setting(setting_name, upload_bucket, backup_bucket)
|
||||
|
Reference in New Issue
Block a user