luci-base: dispatcher: introduce firstnode() dispatching target
authorJo-Philipp Wich <jo@mein.io>
Wed, 19 Sep 2018 17:58:45 +0000 (19:58 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 19 Sep 2018 18:08:19 +0000 (20:08 +0200)
commit11f7817d333c42ec3800f91765f72aa8863111d1
treeabebb680fdc2705464d717c9d487e4ed26406c22
parent58d97b5e271bc0d7507eab5b9bd2902181864e02
luci-base: dispatcher: introduce firstnode() dispatching target

The firstnode target will dispatch the request to the first eligible menu
subtree node that is not a redirect to another node, a special action or
post security enabled page.

That action is specifically useful for global category toplevel nodes like
"admin" which are supposed to simply direct access to the first installed
page node without having to hardcode specific choices.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/dispatcher.lua