[Posts] Show a nicer error message on upload if redis is down

This commit is contained in:
Earlopain 2024-02-19 16:32:58 +01:00
parent bab944ba95
commit b18e921174
No known key found for this signature in database
GPG Key ID: 48860312319ADF61

View File

@ -5,6 +5,8 @@ module DangerZone
def self.min_upload_level
(Cache.redis.get("min_upload_level") || User::Levels::MEMBER).to_i
rescue Redis::CannotConnectError
User::Levels::ADMIN + 1
end
def self.min_upload_level=(min_upload_level)