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
88e8f31c
Commit
88e8f31c
authored
May 08, 2024
by
Timothy J. Baek
Browse files
fix: webui_auth permission issue
parent
1c2aa107
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
backend/apps/web/routers/auths.py
backend/apps/web/routers/auths.py
+3
-1
No files found.
backend/apps/web/routers/auths.py
View file @
88e8f31c
...
...
@@ -131,7 +131,9 @@ async def signin(request: Request, form_data: SigninForm):
request
,
SignupForm
(
email
=
admin_email
,
password
=
admin_password
,
name
=
"User"
),
)
user
=
Auths
.
authenticate_user
(
admin_email
.
lower
(),
admin_password
)
else
:
user
=
Auths
.
authenticate_user
(
form_data
.
email
.
lower
(),
form_data
.
password
)
...
...
@@ -161,7 +163,7 @@ async def signin(request: Request, form_data: SigninForm):
@
router
.
post
(
"/signup"
,
response_model
=
SigninResponse
)
async
def
signup
(
request
:
Request
,
form_data
:
SignupForm
):
if
not
request
.
app
.
state
.
ENABLE_SIGNUP
:
if
not
request
.
app
.
state
.
ENABLE_SIGNUP
and
WEBUI_AUTH
:
raise
HTTPException
(
status
.
HTTP_403_FORBIDDEN
,
detail
=
ERROR_MESSAGES
.
ACCESS_PROHIBITED
)
...
...
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