themes/openwrt: suppress password warning on low privilege pages which have no access...
[project/luci.git] / themes / openwrt / luasrc / view / themes / openwrt.org / header.htm
index 11f6793..1177fa0 100644 (file)
@@ -114,9 +114,6 @@ require("luci.http").prepare_content("application/xhtml+xml")
 <!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/ie7.css" /><![endif]-->
 <% if node and node.css then %><link rel="stylesheet" type="text/css" media="screen" href="<%=resource%>/<%=node.css%>" />
 <% end -%>
-<script type="text/javascript" src="<%=resource%>/VarType.js"></script>
-<script type="text/javascript" src="<%=resource%>/XHTML1.js"></script>
-<script type="text/javascript" src="<%=resource%>/Dropdowns.js"></script>
 <script type="text/javascript" src="<%=resource%>/xhr.js"></script>
 <title><%=striptags( hostname .. ( (node and node.title) and ' - ' .. node.title or '')) %> - LuCI</title>
 </head>
@@ -179,7 +176,7 @@ if tree.nodes[category] and tree.nodes[category].ucidata then
                        </div>
                </noscript>
 
-               <%- if not luci.sys.user.getpasswd("root") then -%>
+               <%- if luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
                <div class="errorbox">
                        <strong><%:No password set!%></strong><br />
                        <%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%>