Repository navigation
feat: add multi-tenant institution workspaces with role hierarchy (#399) - #441
Open
naobadiah01 wants to merge 1 commit into
Open
naobadiah01 wants to merge 1 commit into
naobadiah01 wants to merge 1 commit into
Conversation
…therEdu#399) Implement isolated institution workspaces with an Organization model, a role hierarchy (owner > admin > instructor > registrar), a member invitation flow, and credential issuance scoped to each institution's authority. Cross-tenant data isolation is enforced in the service and middleware and covered by unit tests. Replace the dead tenancy scaffolding (which referenced a non-existent controller) with the new service/middleware/routes, mount the routes under /api/tenants and /api/v1/tenants, and add the institution workspace UI. Also fix a TourProvider SSR regression that was failing the frontend build for every page during static prerendering.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #399
Implements multi-tenant institution workspaces with strict data isolation:
POST /api/tenants(backed by a newOrganizationmodel).owner > admin > instructor > registrar, enforced in the service and middleware (role assignment guards against privilege escalation)./institutionpage for provisioning workspaces and inviting members.Changes
Backend
backend/src/models/Organization.ts— new modelbackend/src/services/tenants/— tenancy service and role hierarchybackend/src/middleware/tenant.ts— isolation middlewarebackend/src/routes/tenants.ts— REST routes + OpenAPI docs, mounted at/api/tenantsand/api/v1/tenantsbackend/tests/services/tenantService.test.ts,backend/tests/middleware/tenant.test.tsFrontend
frontend/src/app/institution/— workspace provisioning and member invitation UITourProviderSSR regression that was failing the static build for every pageTesting
npm test -w backend(new suites: 31 tests passing)npm run build -w backendnpm run build -w frontend