Improve status module

This commit is contained in:
Daniel
2019-01-29 16:20:06 +01:00
parent e8b5cedc9d
commit 321f3feec5
13 changed files with 342 additions and 107 deletions

View File

@@ -20,7 +20,7 @@ func max(a, b uint8) uint8 {
func ConfigIsActive(name string) SecurityLevelOption {
activeAtLevel := config.GetAsInt(name, int64(SecurityLevelDynamic))
return func(minSecurityLevel uint8) bool {
return uint8(activeAtLevel()) <= max(CurrentSecurityLevel(), minSecurityLevel)
return uint8(activeAtLevel()) <= max(ActiveSecurityLevel(), minSecurityLevel)
}
}
@@ -28,6 +28,6 @@ func ConfigIsActive(name string) SecurityLevelOption {
func ConfigIsActiveConcurrent(name string) SecurityLevelOption {
activeAtLevel := config.Concurrent.GetAsInt(name, int64(SecurityLevelDynamic))
return func(minSecurityLevel uint8) bool {
return uint8(activeAtLevel()) <= max(CurrentSecurityLevel(), minSecurityLevel)
return uint8(activeAtLevel()) <= max(ActiveSecurityLevel(), minSecurityLevel)
}
}