mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
* [server config] Introduce isDedicatedInstallation, and use it to replace isSIngleOrgInstallation incl. further cleanup around getConfiguration and server config * [server, dashboard] Remove enableDedicatedOnboardingFlow feature flag and replace is with getInstallationConfiguration.IsDedicatedInstallation * [dashboard, server] Remove "sinlgeOrgMode" * [server] OrganizationService: block createTeam consistently for org-owned users * [server, dashboard] Introduce "enable_multi_org" feature flag to allow admin-user to create organizations * [dashboard] introduce "/?orgSlug=", which allows to pre-select an org in a "create workspace" URL (e.g. "/?orgSlug=org1#github.com/my/repo") * [db] Auto-delete container "test-mysql" if it's already present * fix tests * [dashboard] Check if localStorage is available before using it * [dashboard] SSOLogin: fix orgSlug source precedence to: path/search/localStorage * [server] Deny "joinOrganization" for org-owned users * Gpl/970-multi-org-tests (#20436) * fix tests for real * [server] Create OrgService.createOrgOwnedUser, and use that across tests to fix the "can't join org" permission issues * Update components/server/src/orgs/organization-service.ts Co-authored-by: Filip Troníček <filip@gitpod.io> --------- Co-authored-by: Filip Troníček <filip@gitpod.io> --------- Co-authored-by: Filip Troníček <filip@gitpod.io>
Gitpod-db
Contains all the database related functionality, implemented using typeorm.
Working on gitpod-protocol component
When you are making changes to gitpod-protocol component, make sure to run yarn build in gitpod-protocol folder to make sure your changes will be rebuild. Also consider running yarn watch so that any changes are rebuilt in realtime.
Adding a new table
- Create a migration - use the baseline as an exemplar
- Create a new entity that implements the requisite interface or extend an existing entity as required - see db-user.ts
- If it is a new table, create the matching injectable ORM implementation and interface (if required) - see user-db-impl.ts and user-db.ts. Otherwise extend the existing interface and implementation as required.
- Add the injectable implementation to the DB container module, binding the interface and implementation as appropriate, otherwise it will not be instantiated correctly e.g.
bind(TypeORMUserDBImpl).toSelf().inSingletonScope();
bind(UserDB).toService(TypeORMUserDBImpl);
- Add the new ORM as an injected component where required e.g. in user-controller.ts
@inject(UserDB) protected readonly userDb: UserDB;