X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Fdispatcher.lua;h=0bd19456f2d583d1b7846bde3df6d1c01d1862a2;hp=0876ce658580cf2848f419dd3411638b3f59aaa7;hb=57121f37432fdc4e3eb5f577b4c3fdcb622932ee;hpb=758555db1bcb044bde952b967656327f5b878ca9 diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index 0876ce658..0bd19456f 100644 --- a/modules/luci-base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua @@ -101,7 +101,7 @@ function error500(message) return false end -function authenticator.htmlauth(validator, accs, default) +function authenticator.htmlauth(validator, accs, default, template) local user = http.formvalue("luci_username") local pass = http.formvalue("luci_password") @@ -113,7 +113,7 @@ function authenticator.htmlauth(validator, accs, default) require("luci.template") context.path = {} http.status(403, "Forbidden") - luci.template.render("sysauth", {duser=default, fuser=user}) + luci.template.render(template or "sysauth", {duser=default, fuser=user}) return false @@ -360,7 +360,7 @@ function dispatch(request) if not util.contains(accs, user) then if authen then - local user, sess = authen(sys.user.checkpasswd, accs, def) + local user, sess = authen(sys.user.checkpasswd, accs, def, track.sysauth_template) local token if not user or not util.contains(accs, user) then return