mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-26 23:44:19 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 592b8902a0 | |||
| ff71c1cede |
@@ -195,13 +195,6 @@ class UserRouterGroup(group.RouterGroup):
|
|||||||
@self.route('/set-password', methods=['POST'], auth_type=group.AuthType.USER_TOKEN)
|
@self.route('/set-password', methods=['POST'], auth_type=group.AuthType.USER_TOKEN)
|
||||||
async def _(user_email: str) -> str:
|
async def _(user_email: str) -> str:
|
||||||
"""Set password for Space account (first time) or change password"""
|
"""Set password for Space account (first time) or change password"""
|
||||||
# Check if modifying login info is allowed
|
|
||||||
allow_modify_login_info = self.ap.instance_config.data.get('system', {}).get(
|
|
||||||
'allow_modify_login_info', True
|
|
||||||
)
|
|
||||||
if not allow_modify_login_info:
|
|
||||||
return self.http_status(403, -1, 'Modifying login info is disabled')
|
|
||||||
|
|
||||||
json_data = await quart.request.json
|
json_data = await quart.request.json
|
||||||
new_password = json_data.get('new_password')
|
new_password = json_data.get('new_password')
|
||||||
current_password = json_data.get('current_password')
|
current_password = json_data.get('current_password')
|
||||||
|
|||||||
Reference in New Issue
Block a user