mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FEATURE: Validate setting combination between exif strip and img opt (#16662)
Admins won't be able to disable strip_image_metadata if they don't disable composer_media_optimization_image_enabled first since the later will strip the same metadata on client during upload, making disabling the former have no effect. Bug report at https://meta.discourse.org/t/-/223350
This commit is contained in:

committed by
GitHub

parent
4b92175d4e
commit
94cfe98ee4
@ -239,6 +239,12 @@ module SiteSettings::Validations
|
||||
end
|
||||
end
|
||||
|
||||
def validate_strip_image_metadata(new_val)
|
||||
return if new_val == "t"
|
||||
return if SiteSetting.composer_media_optimization_image_enabled == false
|
||||
validate_error :strip_image_metadata_cannot_be_disabled_if_composer_media_optimization_image_enabled
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def validate_bucket_setting(setting_name, upload_bucket, backup_bucket)
|
||||
|
Reference in New Issue
Block a user