[luci] Login form and default module

Pau hakais at gmail.com
Wed Jul 20 16:30:09 CEST 2011


Thanks Jo-Philipp and Bryan!
Problem solved!

--
./p4u



2011/7/20 Bryan Mayland <bmayland at leoninedev.com>

> The Administration pages gets their security because they are subnodes of
> the "admin" top level node which in controller/admin/index.lua sets the
> node's sysauth = "root" meaning you need to be logged in as root to see it.
>
> The login page always takes you to where you were going.  So to make it go
> to your page after you log in, you need to be going to your page before the
> login page is shown.  The easiest way I found to do this is to add a second
> node that just bounces back to the first.  Set the second node to have a
> sysauth it will require a login then bounce the user back to to your other
> page, except now while logged in:
>
>
> entry({"myApp"}, template("myApp/overview"), "myApp", 1).dependent=false
> local page = entry({"myApp", "login"}, call("myApp_redirect"))
> page.sysauth = "root"
> page.sysauth_authenticator = "htmlauth"
>
> function myApp_redirect()
>    luci.http.redirect(luci.**dispatcher.build_url("myApp")
> end
>
> ______________________________**_________________
> luci mailing list
> luci at lists.subsignal.org
> https://lists.subsignal.org/**mailman/listinfo/luci<https://lists.subsignal.org/mailman/listinfo/luci>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsignal.org/pipermail/luci/attachments/20110720/20c74b63/attachment.html>


More information about the luci mailing list