Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 插件仓库的可见范围可配置 #1346

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,7 @@ def create_project(self, plugin: PluginInstance):
"name": plugin.id,
"namespace_id": self._get_namespace_id(),
"description": plugin.name,
# 私有项目 visibility_level = 0
# 公共项目 visibility_level = 10
"visibility_level": 10,
"visibility_level": settings.PLUGIN_VISIBILTY_LEVEL,
},
)
validate_response(resp)
Expand Down
2 changes: 2 additions & 0 deletions apiserver/paasng/paasng/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,8 @@ def _build_file_handler(log_path: Path, filename: str, format: str) -> Dict:
BK_PLUGIN_APIGW_SERVICE_STAGE = settings.get("BK_PLUGIN_APIGW_SERVICE_STAGE", "prod") # 环境(stage)
BK_PLUGIN_APIGW_SERVICE_USER_AUTH_TYPE = settings.get("BK_PLUGIN_APIGW_SERVICE_USER_AUTH_TYPE", "default") # 用户类型

# 插件仓库的可见范围:私有项目 visibility_level = 0; 公共项目 visibility_level = 10
PLUGIN_VISIBILTY_LEVEL = settings.get("PLUGIN_VISIBILTY_LEVEL", 10)

# -------------
# 引擎相关配置项
Expand Down