luci-app-openvpn: fix stray uci permission warning
authorJo-Philipp Wich <jo@mein.io>
Tue, 25 Jan 2022 21:39:48 +0000 (22:39 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 25 Jan 2022 21:44:58 +0000 (22:44 +0100)
commite927a11d4ed0b8beb60b184e70db110c154816dc
treedaa51bccb4366fd6bb12f1b6eb483aa70359cd4f
parentf1a6523817f14c82781b1dee2300b2ddd1fbe815
luci-app-openvpn: fix stray uci permission warning

The OpenVPN file view uses a dummy Map() instance to render the breadcrumb
template which triggers a uci permission error since the view is being
rendered by a form() action which does not set up the expected permission
flags. CBI Map() instances should only be used for cbi() dispatch targets.

Solve the issue by appending the breadcrumb template directly to the
SimpleForm() instance and by removing the redundant dummy Map() instance.

Fixes: #4370
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 18b1130711b6ff7aacba98034e2bd7f4893b33df)
applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua