Check for empty ac label on load
@@ -18,6 +18,9 @@ type AccessControl struct {
func (m ACDefinitions) Add(name string, ac accesscontrol.AccessControl, eh []*config.ErrorHandler) error {
n := strings.TrimSpace(name)
+ if n == "" {
+ return errors.Configuration.Message("accessControl requires a label")
+ }
if _, ok := m[n]; ok {
return errors.Configuration.Message("accessControl already defined: " + n)
}
