X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Rakka%2FSystemConfig.hs;h=11fe124a155a62c4bcb4f8b4b28601f3804aca59;hb=396dbf64bef1796e9aaee706bc5ec4f1bcf06783;hp=eb526fbc45939a6863d2fc139fd2a45876f8138c;hpb=9ff4eb243ae1545c62a5ab2eaf8dcb2f7c40b20d;p=Rakka.git diff --git a/Rakka/SystemConfig.hs b/Rakka/SystemConfig.hs index eb526fb..11fe124 100644 --- a/Rakka/SystemConfig.hs +++ b/Rakka/SystemConfig.hs @@ -12,6 +12,7 @@ module Rakka.SystemConfig , DefaultPage(..) , StyleSheet(..) , Languages(..) + , GlobalLock(..) , serializeStringPairs , deserializeStringPairs @@ -209,3 +210,15 @@ instance SysConfValue Languages where , ("pt", "Português") , ("sv", "Svenska" ) ] + + +newtype GlobalLock = GlobalLock Bool deriving (Show, Typeable) +instance SysConfValue GlobalLock where + confPath _ = "globalLock" + serialize (GlobalLock isLocked) + | isLocked = "*" + | otherwise = "" + deserialize "*" = Just (GlobalLock True) + deserialize "" = Just (GlobalLock False) + deserialize _ = Nothing + defaultValue _ = GlobalLock False