luci-0.8: freifunk: add public splash status page
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 6 Jun 2009 09:08:41 +0000 (09:08 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 6 Jun 2009 09:08:41 +0000 (09:08 +0000)
modules/freifunk/luasrc/controller/freifunk/freifunk.lua

index 9769ea08bcd6c3e54b7da634bca3caf0294c5ff5..35b33830512aa0a26d249c4daa77bcd7aa30488f 100644 (file)
@@ -54,6 +54,9 @@ function index()
        entry({"freifunk", "status.json"}, call("jsonstatus"))
        entry({"freifunk", "status", "zeroes"}, call("zeroes"), "Testdownload") 
 
+       -- XXX: security violation
+       entry({"freifunk", "status", "splash"}, call("splash_status"), "Client-Splash").setuser = "root"
+
        assign({"freifunk", "olsr"}, {"admin", "status", "olsr"}, "OLSR", 30)
 
        if luci.fs.access("/etc/config/luci_statistics") then
@@ -210,3 +213,7 @@ function jsonstatus()
        http.prepare_content("application/json")
        ltn12.pump.all(json.Encoder(root):source(), http.write)
 end
+
+function splash_status()
+       luci.template.render("admin_status/splash", { is_admin = false })
+end