mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-11 03:37:57 +00:00
A deployment that stands up its own organisation-wide namespace — to use instead of the built-in global one — finds it invisible to everybody. The namespace listing only returns namespaces the caller belongs to, and the only thing that ever added members automatically was hard-wired to the slug "global". Make that list a setting. namespace.default-membership holds the slugs every newly activated account is enrolled in, defaulting to ["global"], which is what every deployment did before. Publishing only requires membership of any role, so being enrolled is enough to publish there; no extra grant needed. GlobalNamespaceMembershipService becomes DefaultNamespaceMembershipService, since it no longer means one specific namespace. Where the strictness sits: - Saving validates every slug resolves to an ACTIVE namespace, so a typo fails at the moment an administrator makes it. - Enrolling tolerates a slug that no longer resolves: it logs and skips. A namespace that was deleted or renamed must not cost somebody their login. Adding a namespace to the list after people have signed up leaves them out, the same trap the personal-namespace work hit, so this ships with the same preview-then-apply backfill. Verified against a real PostgreSQL, end to end: create a namespace, reject an unknown slug, save with whitespace and duplicates and see them normalised, preview, apply, re-preview showing nothing left, and a fresh registration landing in the global namespace, the new shared one, and its own personal one at once. |
||
|---|---|---|
| .. | ||
| .mvn | ||
| scripts | ||
| skillhub-app | ||
| skillhub-auth | ||
| skillhub-domain | ||
| skillhub-infra | ||
| skillhub-notification | ||
| skillhub-search | ||
| skillhub-storage | ||
| .dockerignore | ||
| Dockerfile | ||
| Dockerfile.dev | ||
| mvnw | ||
| mvnw.cmd | ||
| pom.xml | ||