-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Gpl/970-multi-org-tests #20436
Gpl/970-multi-org-tests #20436
Conversation
…sts to fix the "can't join org" permission issues
@@ -473,4 +473,54 @@ describe("OrganizationService", async () => { | |||
); | |||
await assertUpdateSettings("should enable workspace sharing", { workspaceSharingDisabled: false }, {}); | |||
}); | |||
|
|||
it("org-owned users can't create new organizations", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@filiptronicek These are the core tests added
/** | ||
* Conveniece method, analogue to UserService.createUser() | ||
*/ | ||
public async createOrgOwnedUser(params: CreateUserParams & { organizationId: string }): Promise<User> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the method that before was buried in IamSessionApp
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Co-authored-by: Filip Troníček <filip@gitpod.io>
/unhold |
* [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>
Description
Fixes the tests after the latest "not allowed to join org" changes
Related Issue(s)
Fixes #
How to test
Documentation
Preview status
gitpod:summary
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold