diff --git a/components/dashboard/src/Menu.tsx b/components/dashboard/src/Menu.tsx index 1e405b10223027..18cf49bc55e4ca 100644 --- a/components/dashboard/src/Menu.tsx +++ b/components/dashboard/src/Menu.tsx @@ -82,6 +82,7 @@ export default function Menu() { "users", "workspaces", "teams", + "orgs", ].includes(resource) ) { return resource; @@ -118,6 +119,7 @@ export default function Menu() { "usage", "plans", "teams", + "orgs", "variables", "keys", "integrations", @@ -282,8 +284,8 @@ export default function Menu() {
); @@ -330,10 +332,10 @@ export default function Menu() { .sort((a, b) => (a.title.toLowerCase() > b.title.toLowerCase() ? 1 : -1)), { slug: "new", - title: "Create a new team", + title: "Create a new organization", customContent: (
- New Team + New Organization
), - link: "/teams/new", + link: "/orgs/new", }, ]; const classes = @@ -370,7 +372,7 @@ export default function Menu() { d="M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414Z" fill="#78716C" /> - Toggle team selection menu + Toggle organization selection menu diff --git a/components/dashboard/src/admin/TeamsSearch.tsx b/components/dashboard/src/admin/TeamsSearch.tsx index 477342c18dd54b..996ae74b69031c 100644 --- a/components/dashboard/src/admin/TeamsSearch.tsx +++ b/components/dashboard/src/admin/TeamsSearch.tsx @@ -18,7 +18,7 @@ import Pagination from "../Pagination/Pagination"; export default function TeamsSearchPage() { return ( - + ); @@ -104,7 +104,7 @@ export function TeamsSearch() { k.key === "Enter" && search()} onChange={(v) => { setSearchTerm(v.target.value.trim()); @@ -147,7 +147,7 @@ export function TeamsSearch() { return (
diff --git a/components/dashboard/src/admin/admin-menu.ts b/components/dashboard/src/admin/admin-menu.ts index 00e21e764c95b1..b75fc84c4c4428 100644 --- a/components/dashboard/src/admin/admin-menu.ts +++ b/components/dashboard/src/admin/admin-menu.ts @@ -19,8 +19,8 @@ export function getAdminMenu() { link: ["/admin/projects"], }, { - title: "Teams", - link: ["/admin/teams"], + title: "Organizationss", + link: ["/admin/orgs"], }, { title: "Blocked Repositories", diff --git a/components/dashboard/src/app/AppRoutes.tsx b/components/dashboard/src/app/AppRoutes.tsx index 1c3a85d63d504b..f016a0790576c6 100644 --- a/components/dashboard/src/app/AppRoutes.tsx +++ b/components/dashboard/src/app/AppRoutes.tsx @@ -26,7 +26,9 @@ import { settingsPathPreferences, settingsPathTeams, settingsPathTeamsJoin, - settingsPathTeamsNew, + settingsPathOrgs, + settingsPathOrgsJoin, + settingsPathOrgsNew, settingsPathVariables, settingsPathSSHKeys, usagePathMain, @@ -198,7 +200,7 @@ export const AppRoutes: FunctionComponent = ({ user, teams }) => - + @@ -248,11 +250,15 @@ export const AppRoutes: FunctionComponent = ({ user, teams }) => }} /> + {/* TODO remove these navigation after a few weeks */} - - + + + + + {(teams || []).map((team) => ( diff --git a/components/dashboard/src/components/BillingAccountSelector.tsx b/components/dashboard/src/components/BillingAccountSelector.tsx index d64fb0a03db55c..2f9f8fe0a907f2 100644 --- a/components/dashboard/src/components/BillingAccountSelector.tsx +++ b/components/dashboard/src/components/BillingAccountSelector.tsx @@ -28,7 +28,7 @@ export function BillingAccountSelector(props: { onSelected?: () => void }) { return; } - // Fetch the list of teams we can actually attribute to + // Fetch the list of orgs we can actually attribute to getGitpodService() .server.listAvailableUsageAttributionIds() .then((attrIds) => { @@ -59,7 +59,7 @@ export function BillingAccountSelector(props: { onSelected?: () => void }) { (await teamsService.getTeam({ teamId: team!.id })).team?.members || [], ); } catch (error) { - console.warn("Could not get members of team", team, error); + console.warn("Could not get members of org", team, error); } }), ).then(() => setMembersByTeam(members)); diff --git a/components/dashboard/src/components/UsageBasedBillingConfig.tsx b/components/dashboard/src/components/UsageBasedBillingConfig.tsx index a778c8e24a878f..77837521942c9f 100644 --- a/components/dashboard/src/components/UsageBasedBillingConfig.tsx +++ b/components/dashboard/src/components/UsageBasedBillingConfig.tsx @@ -170,7 +170,7 @@ export default function UsageBasedBillingConfig({ attributionId }: Props) {

{attributionId && AttributionId.parse(attributionId)?.kind === "user" ? "Manage billing for your personal account." - : "Manage billing for your team."} + : "Manage billing for your organization."}

{errorMessage && ( diff --git a/components/dashboard/src/components/UsageLimitReachedModal.tsx b/components/dashboard/src/components/UsageLimitReachedModal.tsx index 24a81e82ddae54..4110a23831bf13 100644 --- a/components/dashboard/src/components/UsageLimitReachedModal.tsx +++ b/components/dashboard/src/components/UsageLimitReachedModal.tsx @@ -39,7 +39,7 @@ export function UsageLimitReachedModal(p: { hints: any }) { You have reached the usage limit of your billing account.

- {"Contact a team owner "} + {"Contact an organization owner "} {attributedTeamName && ( <> of {attributedTeamName} diff --git a/components/dashboard/src/components/UsageView.tsx b/components/dashboard/src/components/UsageView.tsx index 1675510a8df1e0..9c0febe7c963b5 100644 --- a/components/dashboard/src/components/UsageView.tsx +++ b/components/dashboard/src/components/UsageView.tsx @@ -174,9 +174,6 @@ function UsageView({ attributionId }: UsageViewProps) { }; const currentPaginatedResults = usagePage?.usageEntriesList.filter((u) => u.kind === "workspaceinstance") ?? []; - - const headerTitle = attributionId.kind === "team" ? "Team Usage" : "Personal Usage"; - const DateDisplay = forwardRef((arg: any, ref: any) => (

-

{headerTitle}

+

Usage

(updated every 15 minutes).

} @@ -281,7 +278,7 @@ function UsageView({ attributionId }: UsageViewProps) { {" "} workspaces {" "} - in {startDate.format("MMMM YYYY")} or checked your other teams? + in {startDate.format("MMMM YYYY")} or checked your other organizations?

)} diff --git a/components/dashboard/src/contexts/FeatureFlagContext.tsx b/components/dashboard/src/contexts/FeatureFlagContext.tsx index b49820dba889c5..a1f1e571077851 100644 --- a/components/dashboard/src/contexts/FeatureFlagContext.tsx +++ b/components/dashboard/src/contexts/FeatureFlagContext.tsx @@ -61,7 +61,7 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => { for (const [flagName, config] of Object.entries(featureFlags)) { const value = async () => { - // First check if the flag is non-default for any of the teams + // First check if the flag is non-default for any of the orgs for (const team of teams || []) { const flagValue = await getExperimentsClient().getValueAsync(flagName, config.defaultValue, { user, diff --git a/components/dashboard/src/hooks/use-user-and-teams-loader.ts b/components/dashboard/src/hooks/use-user-and-teams-loader.ts index 6e885373f61ab6..980b2bf434805e 100644 --- a/components/dashboard/src/hooks/use-user-and-teams-loader.ts +++ b/components/dashboard/src/hooks/use-user-and-teams-loader.ts @@ -47,7 +47,7 @@ export const useUserAndTeamsLoader = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - // TODO: Can this check happen when we load the teams rather than a separate effect? + // TODO: Can this check happen when we load the orgs rather than a separate effect? useEffect(() => { if (!teams) { return; diff --git a/components/dashboard/src/projects/NewProject.tsx b/components/dashboard/src/projects/NewProject.tsx index da163f6fe5595b..2b5d8e40baa1ec 100644 --- a/components/dashboard/src/projects/NewProject.tsx +++ b/components/dashboard/src/projects/NewProject.tsx @@ -333,7 +333,7 @@ export default function NewProject() {

Projects allow you to manage prebuilds and workspaces for your repository.{" "} { - const userFullName = user?.fullName || user?.name || "..."; const teamsToRender = teams || []; return ( <> -

Select team or personal account

+

Select organization

- {teamsToRender.map((t) => (
@@ -567,7 +555,7 @@ export default function NewProject() {
setShowNewTeam(!showNewTeam)} />
- Create new team + Create new organization Collaborate with others
{teamsToRender.length > 0 && ( @@ -624,7 +612,7 @@ export default function NewProject() { ) : ( <> {" "} - in team{" "} + in organization{" "}
{selectedTeamOrUser?.name} diff --git a/components/dashboard/src/projects/ProjectSettings.tsx b/components/dashboard/src/projects/ProjectSettings.tsx index 424567689d4e57..191fce5dc40634 100644 --- a/components/dashboard/src/projects/ProjectSettings.tsx +++ b/components/dashboard/src/projects/ProjectSettings.tsx @@ -141,7 +141,7 @@ export default function () { , first cancel your existing plan. - +
@@ -254,7 +254,7 @@ export default function () { , first cancel your existing plan. - +
diff --git a/components/dashboard/src/projects/RemoveProjectModal.tsx b/components/dashboard/src/projects/RemoveProjectModal.tsx index 29f6dd8ebb3d25..b382a297343ff0 100644 --- a/components/dashboard/src/projects/RemoveProjectModal.tsx +++ b/components/dashboard/src/projects/RemoveProjectModal.tsx @@ -28,7 +28,7 @@ export const RemoveProjectModal: FunctionComponent = ({ return ( {planCards} {assignedTs && userBillingMode?.mode === "chargebee" && !!userBillingMode.teamNames && ( -

Assigned Team Seats

+

Assigned Organization Seats

    {userBillingMode.teamNames.join(", ")}
)} @@ -805,7 +805,7 @@ export default function () { {!!teamClaimModal && ( // TODO: Use title and buttons props setTeamClaimModal(undefined)}> -

Team Invitation

+

Organization Invitation

{teamClaimModal.mode === "error" ? teamClaimModal.errorText : teamClaimModal.text} @@ -925,7 +925,7 @@ function PlanCard(p: PlanCardProps) {

{p.isTsAssigned && (
- Team seat assigned + Organization seat assigned
)}
{p.bottomLabel}
diff --git a/components/dashboard/src/settings/Teams.tsx b/components/dashboard/src/settings/Teams.tsx index 0b88221a97c8f4..f6b93dcccc3b87 100644 --- a/components/dashboard/src/settings/Teams.tsx +++ b/components/dashboard/src/settings/Teams.tsx @@ -29,8 +29,8 @@ export default function Teams() { return (
@@ -469,8 +469,8 @@ function AllTeams() { )}
-

All Team Plans

-

Manage team plans and team members.

+

All Organization Plans

+

Manage organization plans and organization members.

{isChargebeeCustomer && ( @@ -488,7 +488,7 @@ function AllTeams() { } onClick={() => showCreateTeamModal()} > - Create Team Plan + Create Organization Plan )}
@@ -520,12 +520,14 @@ function AllTeams() { {getActiveSubs().length === 0 && !pendingPlanPurchase && !isUsageBasedBillingEnabled && (
-

No Active Team Plans

+

+ No Active Organization Plans +

- Get started by creating a team plan -
and adding team members.{" "} + Get started by creating an organization plan +
and adding members.{" "}
@@ -651,7 +653,7 @@ function InviteMembersModal(props: { sub: TeamSubscription; onClose: () => void

Invite Members

-

Invite members to the team plan using the URL below.

+

Invite members to the plan using the URL below.

- {copied ? "Copied to clipboard!" : "Use this URL to join this team plan."} + {copied ? "Copied to clipboard!" : "Use this URL to join this plan."}

@@ -710,7 +712,7 @@ function AddMembersModal(props: {

Add Members

-

Select the number of members to add to the team plan.

+

Select the number of members to add to the plan.

-

Create a team plan and add team members.

+

Create a plan and add members.

- + diff --git a/components/dashboard/src/teams/TeamBilling.tsx b/components/dashboard/src/teams/TeamBilling.tsx index 1fa53cfc07a49c..cb5f7c71507dd8 100644 --- a/components/dashboard/src/teams/TeamBilling.tsx +++ b/components/dashboard/src/teams/TeamBilling.tsx @@ -190,7 +190,7 @@ export default function TeamBilling() { 2023. )} -

{!teamPlan ? "Select Team Plan" : "Team Plan"}

+

{!teamPlan ? "Select Plan" : "Current Plan"}

{!teamPlan ? (
@@ -213,7 +213,7 @@ export default function TeamBilling() {
) : ( - This team is currently on the {teamPlan.name} plan. + This organization is currently on the {teamPlan.name} plan. )}

@@ -335,7 +335,7 @@ export default function TeamBilling() { )}
- Team Billing automatically adds all members to the plan.{" "} + Gitpod automatically adds all members of this organization to the plan.{" "} Learn more @@ -349,7 +349,7 @@ export default function TeamBilling() { {teamBillingMode === undefined ? (
diff --git a/components/dashboard/src/teams/TeamSettings.tsx b/components/dashboard/src/teams/TeamSettings.tsx index 8492d7710e0fe2..53178f5393b97d 100644 --- a/components/dashboard/src/teams/TeamSettings.tsx +++ b/components/dashboard/src/teams/TeamSettings.tsx @@ -84,7 +84,7 @@ export default function TeamSettings() { setUpdated(true); setTimeout(() => setUpdated(false), 3000); } catch (error) { - setErrorMessage(`Failed to update team information: ${error.message}`); + setErrorMessage(`Failed to update organization information: ${error.message}`); } }, [team, errorMessage, teams, teamName, setTeams]); @@ -96,10 +96,10 @@ export default function TeamSettings() { const newName = event.target.value || ""; setTeamName(newName); if (newName.trim().length === 0) { - setErrorMessage("Team name can not be blank."); + setErrorMessage("Organization name can not be blank."); return; } else if (newName.trim().length > 32) { - setErrorMessage("Team name must not be longer than 32 characters."); + setErrorMessage("Organization name must not be longer than 32 characters."); return; } else { setErrorMessage(undefined); @@ -127,11 +127,11 @@ export default function TeamSettings() { -

Team Name

+

Organization Name

- This is your team's visible name within Gitpod. For example, the name of your company. + This is your organization's visible name within Gitpod. For example, the name of your company.

{errorMessage && ( @@ -140,7 +140,7 @@ export default function TeamSettings() { )} {updated && ( - Team name has been updated. + Organization name has been updated. )}
@@ -157,17 +157,17 @@ export default function TeamSettings() { disabled={team?.name === teamName || !!errorMessage} onClick={updateTeamInformation} > - Update Team Name + Update Organization Name
-

Delete Team

+

Delete Organization

- Deleting this team will also remove all associated data with this team, including projects and - workspaces. Deleted teams cannot be restored! + Deleting this organization will also remove all associated data, including projects and workspaces. + Deleted organizations cannot be restored!

@@ -182,16 +182,16 @@ export default function TeamSettings() { onConfirm={deleteTeam} >

- You are about to permanently delete {team?.slug} including all associated data with this - team. + You are about to permanently delete {team?.slug} including all associated data.

  1. - All projects added in this team will be deleted and cannot be restored afterwards. + All projects added in this organization will be deleted and cannot be restored + afterwards.
  2. - All members of this team will lose access to this team, associated projects and - workspaces. + All members of this organization will lose access to this organization, associated + projects and workspaces.

diff --git a/components/dashboard/src/teams/TeamUsageBasedBilling.tsx b/components/dashboard/src/teams/TeamUsageBasedBilling.tsx index 9bf93b684d45a5..1fbef780d3b4cc 100644 --- a/components/dashboard/src/teams/TeamUsageBasedBilling.tsx +++ b/components/dashboard/src/teams/TeamUsageBasedBilling.tsx @@ -33,7 +33,7 @@ export default function TeamUsageBasedBilling() { return ( <> -

Team Billing

+

Organization Billing

); diff --git a/components/gitpod-db/src/typeorm/team-db-impl.ts b/components/gitpod-db/src/typeorm/team-db-impl.ts index 23460fcf21ccad..310db67a7c8140 100644 --- a/components/gitpod-db/src/typeorm/team-db-impl.ts +++ b/components/gitpod-db/src/typeorm/team-db-impl.ts @@ -126,11 +126,11 @@ export class TeamDBImpl implements TeamDB { const teamRepo = await this.getTeamRepo(); const existingTeam = await teamRepo.findOne({ id: teamId, deleted: false, markedDeleted: false }); if (!existingTeam) { - throw new ResponseError(ErrorCodes.NOT_FOUND, "Team not found"); + throw new ResponseError(ErrorCodes.NOT_FOUND, "Organization not found"); } const name = team.name && team.name.trim(); if (!name || name.length === 0 || name.length > 32) { - throw new ResponseError(ErrorCodes.INVALID_VALUE, "A team's name must be between 1 and 32 characters long"); + throw new ResponseError(ErrorCodes.INVALID_VALUE, "The name must be between 1 and 32 characters long"); } existingTeam.name = name; return teamRepo.save(existingTeam); @@ -138,22 +138,22 @@ export class TeamDBImpl implements TeamDB { public async createTeam(userId: string, name: string): Promise { if (!name) { - throw new ResponseError(ErrorCodes.BAD_REQUEST, "Team name cannot be empty"); + throw new ResponseError(ErrorCodes.BAD_REQUEST, "Name cannot be empty"); } if (!/^[A-Za-z0-9 '_-]+$/.test(name)) { throw new ResponseError( ErrorCodes.BAD_REQUEST, - "Please choose a team name containing only letters, numbers, -, _, ', or spaces.", + "Please choose a name containing only letters, numbers, -, _, ', or spaces.", ); } const slug = name.toLocaleLowerCase().replace(/[ ']/g, "-"); if (blocklist.indexOf(slug) !== -1) { - throw new ResponseError(ErrorCodes.BAD_REQUEST, "Creating a team with this name is not allowed"); + throw new ResponseError(ErrorCodes.BAD_REQUEST, "Creating an organization with this name is not allowed"); } const teamRepo = await this.getTeamRepo(); const existingTeam = await teamRepo.findOne({ slug, deleted: false, markedDeleted: false }); if (!!existingTeam) { - throw new ResponseError(ErrorCodes.CONFLICT, "A team with this name already exists"); + throw new ResponseError(ErrorCodes.CONFLICT, "An organization with this name already exists"); } const team: Team = { id: uuidv4(), @@ -186,7 +186,7 @@ export class TeamDBImpl implements TeamDB { const teamRepo = await this.getTeamRepo(); const team = await teamRepo.findOne(teamId); if (!team || !!team.deleted) { - throw new ResponseError(ErrorCodes.NOT_FOUND, "A team with this ID could not be found"); + throw new ResponseError(ErrorCodes.NOT_FOUND, "An organization with this ID could not be found"); } const membershipRepo = await this.getMembershipRepo(); const membership = await membershipRepo.findOne({ teamId, userId, deleted: false }); @@ -208,7 +208,7 @@ export class TeamDBImpl implements TeamDB { const teamRepo = await this.getTeamRepo(); const team = await teamRepo.findOne(teamId); if (!team || !!team.deleted) { - throw new ResponseError(ErrorCodes.NOT_FOUND, "A team with this ID could not be found"); + throw new ResponseError(ErrorCodes.NOT_FOUND, "An organization with this ID could not be found"); } const membershipRepo = await this.getMembershipRepo(); @@ -219,13 +219,13 @@ export class TeamDBImpl implements TeamDB { deleted: false, }); if (ownerCount <= 1) { - throw new ResponseError(ErrorCodes.CONFLICT, "Team must retain at least one owner"); + throw new ResponseError(ErrorCodes.CONFLICT, "An organization must retain at least one owner"); } } const membership = await membershipRepo.findOne({ teamId, userId, deleted: false }); if (!membership) { - throw new ResponseError(ErrorCodes.NOT_FOUND, "The user is not currently a member of this team"); + throw new ResponseError(ErrorCodes.NOT_FOUND, "The user is not currently a member of this organization"); } membership.role = role; await membershipRepo.save(membership); @@ -235,12 +235,12 @@ export class TeamDBImpl implements TeamDB { const teamRepo = await this.getTeamRepo(); const team = await teamRepo.findOne(teamId); if (!team || !!team.deleted) { - throw new ResponseError(ErrorCodes.NOT_FOUND, "A team with this ID could not be found"); + throw new ResponseError(ErrorCodes.NOT_FOUND, "An organization with this ID could not be found"); } const membershipRepo = await this.getMembershipRepo(); const membership = await membershipRepo.findOne({ teamId, userId, deleted: false }); if (!membership) { - throw new ResponseError(ErrorCodes.NOT_FOUND, "The user is not currently a member of this team"); + throw new ResponseError(ErrorCodes.NOT_FOUND, "The user is not currently a member of this organization"); } membership.subscriptionId = subscriptionId; await membershipRepo.save(membership); @@ -250,12 +250,15 @@ export class TeamDBImpl implements TeamDB { const teamRepo = await this.getTeamRepo(); const team = await teamRepo.findOne(teamId); if (!team || !!team.deleted) { - throw new ResponseError(ErrorCodes.NOT_FOUND, "A team with this ID could not be found"); + throw new ResponseError(ErrorCodes.NOT_FOUND, "An organization with this ID could not be found"); } const membershipRepo = await this.getMembershipRepo(); const membership = await membershipRepo.findOne({ teamId, userId, deleted: false }); if (!membership) { - throw new ResponseError(ErrorCodes.BAD_REQUEST, "You are not currently a member of this team"); + throw new ResponseError( + ErrorCodes.BAD_REQUEST, + "The given user is not currently a member of this organization or does not exist.", + ); } membership.deleted = true; await membershipRepo.save(membership); diff --git a/components/server/src/user/user-controller.ts b/components/server/src/user/user-controller.ts index fa38c914f5c540..5fff0bfae3ec7c 100644 --- a/components/server/src/user/user-controller.ts +++ b/components/server/src/user/user-controller.ts @@ -162,7 +162,7 @@ export class UserController { }); // Simply redirect to the app for now - res.redirect("/teams/new", 307); + res.redirect("/orgs/new", 307); }, BUILTIN_INSTLLATION_ADMIN_USER_ID), ); router.get( diff --git a/components/server/src/workspace/gitpod-server-impl.ts b/components/server/src/workspace/gitpod-server-impl.ts index c5907a8179274b..a76c2b9f26fd1f 100644 --- a/components/server/src/workspace/gitpod-server-impl.ts +++ b/components/server/src/workspace/gitpod-server-impl.ts @@ -2030,7 +2030,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { protected async guardTeamOperation(teamId: string | undefined, op: ResourceAccessOp): Promise { const team = await this.teamDB.findTeamById(teamId || ""); if (!team) { - throw new ResponseError(ErrorCodes.NOT_FOUND, "Team not found"); + throw new ResponseError(ErrorCodes.NOT_FOUND, "Organization not found"); } const members = await this.teamDB.findMembersByTeam(team.id); await this.guardAccess({ kind: "team", subject: team, members }, op); @@ -2047,7 +2047,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { traceAPIParams(ctx, { teamId }); if (!uuidValidate(teamId)) { - throw new ResponseError(ErrorCodes.BAD_REQUEST, "team ID must be a valid UUID"); + throw new ResponseError(ErrorCodes.BAD_REQUEST, "organization ID must be a valid UUID"); } this.checkAndBlockUser("getTeam"); @@ -2064,12 +2064,12 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { traceAPIParams(ctx, { teamId }); if (!teamId || !uuidValidate(teamId)) { - throw new ResponseError(ErrorCodes.BAD_REQUEST, "team ID must be a valid UUID"); + throw new ResponseError(ErrorCodes.BAD_REQUEST, "organization ID must be a valid UUID"); } this.checkUser("updateTeam"); const existingTeam = await this.teamDB.findTeamById(teamId); if (!existingTeam) { - throw new ResponseError(ErrorCodes.NOT_FOUND, `Team ${teamId} does not exist`); + throw new ResponseError(ErrorCodes.NOT_FOUND, `Organization ${teamId} does not exist`); } const members = await this.teamDB.findMembersByTeam(teamId); await this.guardAccess({ kind: "team", subject: existingTeam, members }, "update"); @@ -2082,7 +2082,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { traceAPIParams(ctx, { teamId }); if (!uuidValidate(teamId)) { - throw new ResponseError(ErrorCodes.BAD_REQUEST, "team ID must be a valid UUID"); + throw new ResponseError(ErrorCodes.BAD_REQUEST, "organization ID must be a valid UUID"); } this.checkUser("getTeamMembers"); @@ -2152,7 +2152,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { traceAPIParams(ctx, { teamId, userId, role }); if (!uuidValidate(teamId)) { - throw new ResponseError(ErrorCodes.BAD_REQUEST, "team ID must be a valid UUID"); + throw new ResponseError(ErrorCodes.BAD_REQUEST, "organization ID must be a valid UUID"); } if (!uuidValidate(userId)) { @@ -2172,7 +2172,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { traceAPIParams(ctx, { teamId, userId }); if (!uuidValidate(teamId)) { - throw new ResponseError(ErrorCodes.BAD_REQUEST, "team ID must be a valid UUID"); + throw new ResponseError(ErrorCodes.BAD_REQUEST, "organization ID must be a valid UUID"); } if (!uuidValidate(userId)) { @@ -2184,7 +2184,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { await this.guardTeamOperation(teamId, user.id === userId ? "get" : "update"); const membership = await this.teamDB.findTeamMembership(userId, teamId); if (!membership) { - throw new Error(`Could not find membership for user '${userId}' in team '${teamId}'`); + throw new Error(`Could not find membership for user '${userId}' in organization '${teamId}'`); } await this.teamDB.removeMemberFromTeam(userId, teamId); await this.onTeamMemberRemoved(userId, teamId, membership.id); @@ -2202,7 +2202,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { traceAPIParams(ctx, { teamId }); if (!uuidValidate(teamId)) { - throw new ResponseError(ErrorCodes.BAD_REQUEST, "team ID must be a valid UUID"); + throw new ResponseError(ErrorCodes.BAD_REQUEST, "organization ID must be a valid UUID"); } this.checkUser("getGenericInvite"); @@ -2218,7 +2218,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { traceAPIParams(ctx, { teamId }); if (!uuidValidate(teamId)) { - throw new ResponseError(ErrorCodes.BAD_REQUEST, "team ID must be a valid UUID"); + throw new ResponseError(ErrorCodes.BAD_REQUEST, "organization ID must be a valid UUID"); } this.checkAndBlockUser("resetGenericInvite");