Nanny7 commited on
Commit
5246bcd
·
1 Parent(s): 4477a90

Fix OpenWebUI auth bootstrap

Browse files
Files changed (2) hide show
  1. config/ui_policy.json +4 -3
  2. docker-entrypoint.sh +8 -0
config/ui_policy.json CHANGED
@@ -1,6 +1,10 @@
1
  {
2
  "default_models": "montaigne",
3
  "default_pinned_models": "montaigne",
 
 
 
 
4
  "permissions": {
5
  "workspace": {
6
  "models": false,
@@ -70,9 +74,6 @@
70
  }
71
  },
72
  "features": {
73
- "auth": true,
74
- "enable_signup": true,
75
- "enable_login_form": true,
76
  "enable_code_execution": false,
77
  "enable_public_active_users_count": false,
78
  "enable_easter_eggs": false,
 
1
  {
2
  "default_models": "montaigne",
3
  "default_pinned_models": "montaigne",
4
+ "ui": {
5
+ "enable_signup": true,
6
+ "ENABLE_LOGIN_FORM": true
7
+ },
8
  "permissions": {
9
  "workspace": {
10
  "models": false,
 
74
  }
75
  },
76
  "features": {
 
 
 
77
  "enable_code_execution": false,
78
  "enable_public_active_users_count": false,
79
  "enable_easter_eggs": false,
docker-entrypoint.sh CHANGED
@@ -1,6 +1,11 @@
1
  #!/bin/bash
2
  set -e
3
 
 
 
 
 
 
4
  SUGGESTIONS_FILE="/app/montaigne-config/prompt_suggestions.json"
5
  POLICY_FILE="/app/montaigne-config/ui_policy.json"
6
  MINIMAL_UI_PATCH_FILE="/app/montaigne-config/minimal_ui_patch.js"
@@ -49,6 +54,9 @@ def merge_config(config: dict, suggestions: list, policy: dict) -> dict:
49
  ui["prompt_suggestions"] = suggestions
50
  config["ui"] = ui
51
 
 
 
 
52
  # Policy fields
53
  if "default_models" in policy:
54
  config["default_models"] = policy["default_models"]
 
1
  #!/bin/bash
2
  set -e
3
 
4
+ export WEBUI_AUTH=true
5
+ export ENABLE_FORWARD_USER_INFO_HEADERS=true
6
+ export ENABLE_LOGIN_FORM=true
7
+ export ENABLE_SIGNUP=true
8
+
9
  SUGGESTIONS_FILE="/app/montaigne-config/prompt_suggestions.json"
10
  POLICY_FILE="/app/montaigne-config/ui_policy.json"
11
  MINIMAL_UI_PATCH_FILE="/app/montaigne-config/minimal_ui_patch.js"
 
54
  ui["prompt_suggestions"] = suggestions
55
  config["ui"] = ui
56
 
57
+ if "ui" in policy:
58
+ deep_update(ui, policy["ui"])
59
+
60
  # Policy fields
61
  if "default_models" in policy:
62
  config["default_models"] = policy["default_models"]