|
|
|
|
@ -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()
|
|
|
|
|
|
|
|
|
|
|