feat: bypass sso_verified apps

This commit is contained in:
GareArc
2025-05-26 12:09:30 +08:00
parent 3995f55cbc
commit 467a1f4063
2 changed files with 5 additions and 1 deletions

View File

@ -59,7 +59,11 @@ class InstalledAppsListApi(Resource):
if FeatureService.get_system_features().webapp_auth.enabled:
user_id = current_user.id
res = []
app_ids = [installed_app["app"].id for installed_app in installed_app_list]
access_modes = EnterpriseService.WebAppAuth.batch_get_app_access_mode_by_id(app_ids)
for installed_app in installed_app_list:
if access_modes.get(installed_app["app"].id).access_mode == "sso_verified":
continue
app_code = AppService.get_app_code_by_id(str(installed_app["app"].id))
if EnterpriseService.WebAppAuth.is_user_allowed_to_access_webapp(
user_id=user_id,