Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
36b94ca5
Commit
36b94ca5
authored
Jul 24, 2024
by
Dillon
Browse files
updated environment variable to suggested ENABLE_LOGIN_FORM
parent
4ecf9dd6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
backend/apps/webui/main.py
backend/apps/webui/main.py
+2
-2
backend/config.py
backend/config.py
+4
-4
backend/main.py
backend/main.py
+1
-1
src/lib/stores/index.ts
src/lib/stores/index.ts
+1
-1
src/routes/auth/+page.svelte
src/routes/auth/+page.svelte
+3
-3
No files found.
backend/apps/webui/main.py
View file @
36b94ca5
...
...
@@ -35,7 +35,7 @@ from config import (
DEFAULT_PROMPT_SUGGESTIONS
,
DEFAULT_USER_ROLE
,
ENABLE_SIGNUP
,
ENABLE_
USERNAME_PASSWORD_
LOGIN
,
ENABLE_LOGIN
_FORM
,
USER_PERMISSIONS
,
WEBHOOK_URL
,
WEBUI_AUTH_TRUSTED_EMAIL_HEADER
,
...
...
@@ -65,7 +65,7 @@ origins = ["*"]
app
.
state
.
config
=
AppConfig
()
app
.
state
.
config
.
ENABLE_SIGNUP
=
ENABLE_SIGNUP
app
.
state
.
config
.
ENABLE_
USERNAME_PASSWORD_LOGIN
=
ENABLE_USERNAME_PASSWORD_LOGIN
app
.
state
.
config
.
ENABLE_
LOGIN_FORM
=
ENABLE_LOGIN_FORM
app
.
state
.
config
.
JWT_EXPIRES_IN
=
JWT_EXPIRES_IN
app
.
state
.
AUTH_TRUSTED_EMAIL_HEADER
=
WEBUI_AUTH_TRUSTED_EMAIL_HEADER
app
.
state
.
AUTH_TRUSTED_NAME_HEADER
=
WEBUI_AUTH_TRUSTED_NAME_HEADER
...
...
backend/config.py
View file @
36b94ca5
...
...
@@ -709,10 +709,10 @@ ENABLE_SIGNUP = PersistentConfig(
),
)
ENABLE_
USERNAME_PASSWORD_
LOGIN
=
PersistentConfig
(
"ENABLE_
USERNAME_PASSWORD_
LOGIN"
,
"ui.
enable_username_password_login
"
,
os
.
environ
.
get
(
"ENABLE_
USERNAME_PASSWORD_
LOGIN"
,
"True"
).
lower
()
==
"true"
,
ENABLE_LOGIN
_FORM
=
PersistentConfig
(
"ENABLE_LOGIN
_FORM
"
,
"ui.
ENABLE_LOGIN_FORM
"
,
os
.
environ
.
get
(
"ENABLE_LOGIN
_FORM
"
,
"True"
).
lower
()
==
"true"
,
)
DEFAULT_LOCALE
=
PersistentConfig
(
...
...
backend/main.py
View file @
36b94ca5
...
...
@@ -1995,7 +1995,7 @@ async def get_app_config():
"auth"
:
WEBUI_AUTH
,
"auth_trusted_header"
:
bool
(
webui_app
.
state
.
AUTH_TRUSTED_EMAIL_HEADER
),
"enable_signup"
:
webui_app
.
state
.
config
.
ENABLE_SIGNUP
,
"enable_
username_password_
login"
:
webui_app
.
state
.
config
.
ENABLE_
USERNAME_PASSWORD_
LOGIN
,
"enable_login
_form
"
:
webui_app
.
state
.
config
.
ENABLE_LOGIN
_FORM
,
"enable_web_search"
:
rag_app
.
state
.
config
.
ENABLE_RAG_WEB_SEARCH
,
"enable_image_generation"
:
images_app
.
state
.
config
.
ENABLED
,
"enable_community_sharing"
:
webui_app
.
state
.
config
.
ENABLE_COMMUNITY_SHARING
,
...
...
src/lib/stores/index.ts
View file @
36b94ca5
...
...
@@ -145,7 +145,7 @@ type Config = {
auth
:
boolean
;
auth_trusted_header
:
boolean
;
enable_signup
:
boolean
;
enable_
username_password_
login
:
boolean
;
enable_login
_form
:
boolean
;
enable_web_search
?:
boolean
;
enable_image_generation
:
boolean
;
enable_admin_export
:
boolean
;
...
...
src/routes/auth/+page.svelte
View file @
36b94ca5
...
...
@@ -173,7 +173,7 @@
{/if}
</div>
{#if $config?.features.enable_
username_password_
login}
{#if $config?.features.enable_login
_form
}
<div class="flex flex-col mt-4">
{#if mode === 'signup'}
<div>
...
...
@@ -218,7 +218,7 @@
</div>
{/if}
{#if $config?.features.enable_
username_password_
login}
{#if $config?.features.enable_login
_form
}
<div class="mt-5">
<button
class=" bg-gray-900 hover:bg-gray-800 w-full rounded-2xl text-white font-medium text-sm py-3 transition"
...
...
@@ -255,7 +255,7 @@
{#if Object.keys($config?.oauth?.providers ?? {}).length > 0}
<div class="inline-flex items-center justify-center w-full">
<hr class="w-64 h-px my-8 bg-gray-200 border-0 dark:bg-gray-700" />
{#if $config?.features.enable_
username_password_
login}
{#if $config?.features.enable_login
_form
}
<span
class="absolute px-3 font-medium text-gray-900 -translate-x-1/2 bg-white left-1/2 dark:text-white dark:bg-gray-950"
>{$i18n.t('or')}</span
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment