summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-system/htdocs/luci-static/resources/view
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-04-16 15:36:39 +0200
committerJo-Philipp Wich <jo@mein.io>2020-04-16 15:36:39 +0200
commitd7a17641d3411b71565135d5749037b7c18ffb69 (patch)
tree3904fe1a1cd1c667102abb55bdb4606436e71f28 /modules/luci-mod-system/htdocs/luci-static/resources/view
parent01129d5297fa83069a2b1953e19184fe152d8b90 (diff)
luci-mod-system: password.js: make readonly on insufficient ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-system/htdocs/luci-static/resources/view')
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/password.js2
1 files changed, 2 insertions, 0 deletions
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 2b79633cac..f3275606ce 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'));