lib/ardtweeno/dispatcher.rb in ardtweeno-0.4.0 vs lib/ardtweeno/dispatcher.rb in ardtweeno-0.5.0

- old
+ new

@@ -628,21 +628,22 @@ # - ++ -> key String # * *Returns* : # - true/false # * *Raises* : # - def authenticate?(key) + def authenticate?(key) if key == @confdata["adminkey"] - return true + return true, {:role=>"admin"} else @confdata["zones"].each do |i| if i["zonekey"] == key - return true + i[:role] = "zone" + return true, i end end - return false + return false, {} end end