mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 03:16:51 +08:00
fix: site enable check (#645)
This commit is contained in:
@@ -38,6 +38,8 @@ def decode_jwt_token():
|
|||||||
app_model = db.session.query(App).filter(App.id == decoded['app_id']).first()
|
app_model = db.session.query(App).filter(App.id == decoded['app_id']).first()
|
||||||
if not app_model:
|
if not app_model:
|
||||||
raise NotFound()
|
raise NotFound()
|
||||||
|
if app_model.enable_site is False:
|
||||||
|
raise Unauthorized('Site is disabled.')
|
||||||
end_user = db.session.query(EndUser).filter(EndUser.id == decoded['end_user_id']).first()
|
end_user = db.session.query(EndUser).filter(EndUser.id == decoded['end_user_id']).first()
|
||||||
if not end_user:
|
if not end_user:
|
||||||
raise NotFound()
|
raise NotFound()
|
||||||
|
|||||||
Reference in New Issue
Block a user