mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
fix: remove debug logs
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
import logging
|
||||
import uuid
|
||||
from typing import cast
|
||||
|
||||
@ -68,7 +67,6 @@ class AppListApi(Resource):
|
||||
|
||||
if FeatureService.get_system_features().webapp_auth.enabled:
|
||||
app_ids = [str(app.id) for app in app_pagination.items]
|
||||
logging.info(f"app_ids: {app_ids}")
|
||||
res = EnterpriseService.WebAppAuth.batch_get_app_access_mode_by_id(app_ids=app_ids)
|
||||
if len(res) != len(app_ids):
|
||||
raise BadRequest("Invalid app id in webapp auth")
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import logging
|
||||
from functools import wraps
|
||||
|
||||
from flask_login import current_user # type: ignore
|
||||
@ -61,12 +60,10 @@ def user_allowed_to_access_app(view=None):
|
||||
if feature.webapp_auth.enabled:
|
||||
app_id = installed_app.app_id
|
||||
app_code = AppService.get_app_code_by_id(app_id)
|
||||
logging.info(f"app_id: {app_id}, app_code: {app_code}")
|
||||
res = EnterpriseService.WebAppAuth.is_user_allowed_to_access_webapp(
|
||||
user_id=str(current_user.id),
|
||||
app_code=app_code,
|
||||
)
|
||||
logging.info(f"res: {res}")
|
||||
if not res:
|
||||
raise AppAccessDeniedError()
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import logging
|
||||
|
||||
from flask import request
|
||||
from flask_restful import Resource, marshal_with, reqparse # type: ignore
|
||||
@ -84,10 +83,7 @@ class AppWebAuthPermission(Resource):
|
||||
args = parser.parse_args()
|
||||
|
||||
app_id = args["appId"]
|
||||
logging.info(f"App ID: {app_id}, User ID: {user_id}")
|
||||
|
||||
app_code = AppService.get_app_code_by_id(app_id)
|
||||
logging.info(f"App code: {app_code}")
|
||||
|
||||
res = EnterpriseService.WebAppAuth.is_user_allowed_to_access_webapp(str(user_id), app_code)
|
||||
return {"result": res}
|
||||
|
||||
Reference in New Issue
Block a user