* libs/web: Added Logout support
[project/luci.git] / modules / admin-core / luasrc / controller / admin / index.lua
index 93d2e47..eb58e00 100644 (file)
@@ -40,5 +40,10 @@ function index()
        page.target = cbi("admin_index/luci")
        page.title  = i18n("a_i_ui", "Oberfläche")
        
-       
+       entry({"admin", "logout"}, call("action_logout"), i18n("logout"))
+end
+
+function action_logout()
+       luci.http.header("Set-Cookie", "sysauth=; path=/")
+       luci.http.redirect(luci.dispatcher.build_url())
 end
\ No newline at end of file