From: Jo-Philipp Wich Date: Thu, 16 Apr 2020 13:36:39 +0000 (+0200) Subject: luci-mod-system: password.js: make readonly on insufficient ACLs X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d7a17641d3411b71565135d5749037b7c18ffb69;p=oweals%2Fluci.git luci-mod-system: password.js: make readonly on insufficient ACLs Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/password.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/password.js index 2b79633ca..f3275606c 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/password.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/password.js @@ -44,6 +44,8 @@ return view.extend({ var m, s, o; m = new form.JSONMap(formData, _('Router Password'), _('Changes the administrator password for accessing the device')); + m.readonly = !L.hasViewPermission(); + s = m.section(form.NamedSection, 'password', 'password'); o = s.option(form.Value, 'pw1', _('Password'));