♻️ Get rid of CONFIG_ACCESS_CONTROL_ACTIVE

Deprecate it, as with ACL now being obligatory we
can use other data to figure out whether first run
setup has been completed yet or not.
This commit is contained in:
Gina Häußge committed 2022-11-03 16:41:16 +01:00
1 parent 85aa57df1f
commit d03ba9b364
2 files changed
+10 -8

No files matched your search

@@ -18,10 +18,9 @@ $(function () {
};
self.showDialog = function () {
if (
!CONFIG_WIZARD ||
!(!CONFIG_ACCESS_CONTROL_ACTIVE || self.loginState.isAdmin())
)
// only open a wizard if we have one and either are in first run OR logged in
// as admin
if (!CONFIG_WIZARD || (!CONFIG_FIRST_RUN && !self.loginState.isAdmin()))
return;
self.getWizardDetails().done(function (response) {
+7 -4
View File
@@ -11,9 +11,6 @@
var CONFIG_LOGFILESPERPAGE = 10;
var CONFIG_USERSPERPAGE = 10;
var CONFIG_GROUPSPERPAGE = 10;
var CONFIG_WEBCAM_STREAM = "{{ webcamStream|e }}"; // deprecated, only left for compatibility reasons
var CONFIG_ACCESS_CONTROL = true; // deprecated, only left for compatibility reasons
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 %}
@@ -25,7 +22,6 @@
// sockjs should define CLOSE_NORMAL for us, but they don't (from ws spec)
var SOCKJS_CLOSE_NORMAL = 1000;
var UI_API_KEY = ""; // deprecated, only left for compatibility reasons
var VERSION = "{{ version.number|e }}";
var DISPLAY_VERSION = "{{ version.display|e }}";
var BRANCH = "{{ version.branch|e }}";
@@ -42,6 +38,13 @@
var ADDITIONAL_VIEWMODELS = [];
var OCTOPRINT_ADDITIONAL_BINDINGS = [];
// deprecated stuff only kept for backwards compatibility goes here
var CONFIG_WEBCAM_STREAM = "{{ webcamStream|e }}"; // deprecated, only left for compatibility reasons
var CONFIG_ACCESS_CONTROL = true; // deprecated, only left for compatibility reasons
var CONFIG_ACCESS_CONTROL_ACTIVE = {% if accessControlActive -%} true; {% else %} false; {%- endif %}; // deprecated, only left for compatibility reasons
var UI_API_KEY = ""; // deprecated, only left for compatibility reasons
// end of deprecated stuff
{% if templates.tab.order %}
{% set first_tab = templates.tab.order[0] %}
{% set entry, data = templates.tab.entries[first_tab] %}