Hello,
We are preparing to rewrite the Freifunk firmware to be compliant with Luci JS and have run into a few issues. The first of which is most likely blocking the other issues. The way the firmware has been working has been to allow unauthorized users to be able to see status/contact/statistic info of a router from anywhere on the mesh network. Perhaps the most use publicly accessible page on the mesh network is the list of neighbors and the corresponding link quality (from the OLSRd status page).
With Lua we were able to create menu entries as well as links (bottom right) with the code found in https://github.com/Freifunk-Spalter/packages/blob/master/luci/luci-mod-falter/luasrc/controller/freifunk/freifunk.lua
A co-developer and I have tried to mimic a part of this functionality with the following menu.d json entry:
{
"unauth": {
"title": "Freifunk",
"order": 10,
"action": {
"type": "firstchild",
"recurse": true
},
"auth": {
"methods": [ "cookie:sysauth" ],
"login": false
},
"depends": {
"acl": [ "luci-mod-status-logs" ]
}
},
"unauth/overview": {
"title": "Overview",
"order": 15,
"action": {
"type": "view",
"path": "freifunk/index"
},
"depends": {
"acl": [ "luci-mod-status-logs" ]
}
},
"unauth/contact": {
"title": "Contact",
"order": 20,
"action": {
"type": "view",
"path": "freifunk/index"
},
"depends": {
"acl": [ "luci-mod-status-logs" ]
}
}
}
We are using luci-mod-status-logs as a placeholder until we write our own content.
What happens is that unless the user is logged in, nothing is shown. But as soon as the user logs in, the links on the bottom are visible and the menu entries are accessible.
(The reboot page is shown just because it is small enough to show the header and footer)
And after clicking on "Freifunk" on the bottom, the user sees this in the header:
So the question is: How can we provide the ability to have unauthorized users access the status/contact/statistic pages?
Any help would be greatly appreciated.