mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-08 03:07:51 +00:00
fix(namespace): enable personal provisioning by default
This commit is contained in:
parent
ee0f0763db
commit
eeb63613f2
4 changed files with 6 additions and 6 deletions
|
|
@ -75,9 +75,9 @@ slug 模板渲染后按 `SlugValidator` 的规则归一化:转小写、
|
|||
| 位置 | 项 | 默认 |
|
||||
|------|-----|------|
|
||||
| `application.yml` | `skillhub.namespace.personal-provisioning.enabled` | `false` |
|
||||
| 配置文件/环境变量 | 启用开关 | `false` |
|
||||
| 配置文件/环境变量 | 启用开关 | `true` |
|
||||
|
||||
**默认关闭**:升级不应该让现有部署突然开始建命名空间。
|
||||
默认只对新激活账号生效,不回填已有账号;如需关闭可设置环境变量。
|
||||
|
||||
模板刻意**不放在 `application.yml`**:它们含 `${...}`,
|
||||
Spring 会当成属性占位符去解析(Boot 3.2 / Framework 6.1 尚不支持转义 `\${`)。
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ skillhub:
|
|||
# Whether a newly activated account gets a namespace of its own.
|
||||
# Slug and display-name templates use safe code defaults in PersonalNamespaceProvisioningProperties.
|
||||
personal-provisioning:
|
||||
enabled: ${SKILLHUB_NAMESPACE_PERSONAL_PROVISIONING_ENABLED:false}
|
||||
enabled: ${SKILLHUB_NAMESPACE_PERSONAL_PROVISIONING_ENABLED:true}
|
||||
public:
|
||||
base-url: ${SKILLHUB_PUBLIC_BASE_URL:}
|
||||
access-policy:
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public class PersonalNamespaceProvisioningProperties {
|
|||
/**
|
||||
* Off by default: existing deployments must not start creating namespaces after an upgrade.
|
||||
*/
|
||||
private boolean enabled = false;
|
||||
private boolean enabled = true;
|
||||
|
||||
/**
|
||||
* Templates remain code defaults because Spring treats {@code ${...}} in YAML as property
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ class PersonalNamespaceProvisioningServiceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void defaultsAreDisabledSoUpgradesDoNotStartCreatingNamespaces() {
|
||||
assertEquals(false, new PersonalNamespaceProvisioningProperties().isEnabled());
|
||||
void defaultsAreEnabledForNewAccountProvisioning() {
|
||||
assertEquals(true, new PersonalNamespaceProvisioningProperties().isEnabled());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue