mirror of https://github.com/langgenius/dify.git
feat: bypass sso_verified apps
This commit is contained in:
parent
3995f55cbc
commit
467a1f4063
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from services.enterprise.base import EnterpriseRequest
|
|||
|
||||
class WebAppSettings(BaseModel):
|
||||
access_mode: str = Field(
|
||||
description="Access mode for the web app. Can be 'public' or 'private'",
|
||||
description="Access mode for the web app. Can be 'public', 'private', 'private_all', 'sso_verified'",
|
||||
default="private",
|
||||
alias="accessMode",
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue