Make connection dialog visible for users again

Should actually not have been limited to admins-only, that was an accident
during switching to 1.2.0 implementation.

Once #1110 is tackled, this should be something configurable based on the role
as well.
This commit is contained in:
Gina Häußge 2016-05-19 10:42:27 +02:00
parent 2c0fa7c1d1
commit b1e75a1033
2 changed files with 3 additions and 3 deletions

View file

@ -128,7 +128,7 @@ def index():
# sidebar
templates["sidebar"]["entries"]= dict(
connection=(gettext("Connection"), dict(template="sidebar/connection.jinja2", _div="connection", icon="signal", styles_wrapper=["display: none"], data_bind="visible: loginState.isAdmin")),
connection=(gettext("Connection"), dict(template="sidebar/connection.jinja2", _div="connection", icon="signal", styles_wrapper=["display: none"], data_bind="visible: loginState.isUser")),
state=(gettext("State"), dict(template="sidebar/state.jinja2", _div="state", icon="info-sign")),
files=(gettext("Files"), dict(template="sidebar/files.jinja2", _div="files", icon="list", classes_content=["overflow_visible"], template_header="sidebar/files_header.jinja2"))
)

View file

@ -93,7 +93,7 @@ $(function() {
} else if (!self.isOperational() && !connectionTab.hasClass("in")) {
connectionTab.collapse("show");
}
}
};
self._processStateData = function(data) {
self.previousIsOperational = self.isOperational();
@ -106,7 +106,7 @@ $(function() {
self.isReady(data.flags.ready);
self.isLoading(data.flags.loading);
if (self.loginState.isAdmin() && self.previousIsOperational != self.isOperational()) {
if (self.loginState.isUser() && self.previousIsOperational != self.isOperational()) {
// only open or close if the panel is visible (for admins) and
// the state just changed to avoid thwarting manual open/close
self.openOrCloseOnStateChange();