Don't display wizard if ACL is active and user not logged in
Fixes #1365
This commit is contained in:
parent
de78c14ae3
commit
467cda54a4
3 changed files with 4 additions and 1 deletions
|
|
@ -223,10 +223,12 @@ def index():
|
|||
else:
|
||||
wizard = wizard_active(_templates)
|
||||
enable_accesscontrol = userManager.enabled
|
||||
accesscontrol_active = enable_accesscontrol and userManager.hasBeenCustomized()
|
||||
render_kwargs.update(dict(
|
||||
webcamStream=settings().get(["webcam", "stream"]),
|
||||
enableTemperatureGraph=settings().get(["feature", "temperatureGraph"]),
|
||||
enableAccessControl=enable_accesscontrol,
|
||||
accessControlActive=accesscontrol_active,
|
||||
enableSdSupport=settings().get(["feature", "sdSupport"]),
|
||||
gcodeMobileThreshold=settings().get(["gcodeViewer", "mobileSizeThreshold"]),
|
||||
gcodeThreshold=settings().get(["gcodeViewer", "sizeThreshold"]),
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ $(function() {
|
|||
};
|
||||
|
||||
self.showDialog = function() {
|
||||
if (!CONFIG_WIZARD || !(CONFIG_FIRST_RUN || self.loginState.isAdmin())) return;
|
||||
if (!CONFIG_WIZARD || !((CONFIG_FIRST_RUN && !CONFIG_ACCESS_CONTROL_ACTIVE) || self.loginState.isAdmin())) return;
|
||||
|
||||
self.getWizardDetails()
|
||||
.done(function(response) {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
var CONFIG_USERSPERPAGE = 10;
|
||||
var CONFIG_WEBCAM_STREAM = "{{ webcamStream|e }}";
|
||||
var CONFIG_ACCESS_CONTROL = {% if enableAccessControl -%} true; {% else %} false; {%- endif %}
|
||||
var CONFIG_ACCESS_CONTROL_ACTIVE = {% if accessControlActive -%} true; {% else %} false; {%- endif %}
|
||||
var CONFIG_SD_SUPPORT = {% if enableSdSupport -%} true; {% else %} false; {%- endif %}
|
||||
var CONFIG_FIRST_RUN = {% if firstRun -%} true; {% else %} false; {%- endif %}
|
||||
var CONFIG_TEMPERATURE_GRAPH = {% if enableTemperatureGraph -%} true; {% else %} false; {%- endif %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue