Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
553f4cb
feat: implement support for multiple groups
wilsonrivera May 28, 2025
cfcaccd
feat: add audit log for the groups update
wilsonrivera May 29, 2025
d5d8f32
feat: update ui to select multiple groups
wilsonrivera May 30, 2025
82c6abd
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera May 30, 2025
8d9ba5e
chore: update dialog title
wilsonrivera May 30, 2025
4d759e3
chore: fix test
wilsonrivera May 30, 2025
e5d4c5f
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jun 2, 2025
6a526e8
chore: fix merge conflict
wilsonrivera Jun 2, 2025
636859f
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jun 2, 2025
cd148d0
chore: add test for when group members are moved to a group they alre…
wilsonrivera Jun 2, 2025
1acc3b5
Merge remote-tracking branch 'origin/wilson/eng-7240-allow-users-to-b…
wilsonrivera Jun 2, 2025
642a3df
chore: rethrow on keycloak creation fails
wilsonrivera Jun 2, 2025
c4e62df
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jun 3, 2025
75435d0
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jun 4, 2025
7ce96df
feat: solve merge conflicts
wilsonrivera Jun 4, 2025
5ca3701
chore: fix failing test
wilsonrivera Jun 4, 2025
cf9cc66
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jun 5, 2025
8753e48
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jun 6, 2025
c60a04d
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jun 9, 2025
1acdb73
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jun 11, 2025
aec0c37
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jun 12, 2025
2cc7a40
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jun 16, 2025
b70dbe2
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jun 16, 2025
e3053e9
feat: invite users to multiple groups
wilsonrivera Jun 16, 2025
533816a
chore: update group migration script
wilsonrivera Jun 16, 2025
8d7a79a
feat: wrap group update in transaction
wilsonrivera Jun 21, 2025
2210414
chore: remove not-needed empty groups validation
wilsonrivera Jun 21, 2025
24c76a3
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jun 21, 2025
25406d2
Merge branch 'main' into wilson/eng-7240-allow-users-to-be-part-of-mu…
wilsonrivera Jul 1, 2025
07b428a
feat: prevent removing organization members from all groups when upda…
wilsonrivera Jul 1, 2025
737ada1
feat: add additional tests
wilsonrivera Jul 1, 2025
5dcc8c4
chore: some small refactor
wilsonrivera Jul 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8,276 changes: 4,133 additions & 4,143 deletions connect-go/gen/proto/wg/cosmo/platform/v1/platform.pb.go

Large diffs are not rendered by default.

22 changes: 8 additions & 14 deletions connect/src/wg/cosmo/platform/v1/platform_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7442,9 +7442,9 @@ export class InviteUserRequest extends Message<InviteUserRequest> {
email = "";

/**
* @generated from field: string groupId = 2;
* @generated from field: repeated string groups = 2;
*/
groupId = "";
groups: string[] = [];

constructor(data?: PartialMessage<InviteUserRequest>) {
super();
Expand All @@ -7455,7 +7455,7 @@ export class InviteUserRequest extends Message<InviteUserRequest> {
static readonly typeName = "wg.cosmo.platform.v1.InviteUserRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "groupId", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "groups", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): InviteUserRequest {
Expand Down Expand Up @@ -10457,19 +10457,14 @@ export class UpdateOrganizationDetailsResponse extends Message<UpdateOrganizatio
*/
export class UpdateOrgMemberGroupRequest extends Message<UpdateOrgMemberGroupRequest> {
/**
* @generated from field: string userID = 1;
*/
userID = "";

/**
* @generated from field: string orgMemberUserID = 2;
* @generated from field: string orgMemberUserID = 1;
*/
orgMemberUserID = "";

/**
* @generated from field: string groupId = 3;
* @generated from field: repeated string groups = 2;
*/
groupId = "";
groups: string[] = [];

constructor(data?: PartialMessage<UpdateOrgMemberGroupRequest>) {
super();
Expand All @@ -10479,9 +10474,8 @@ export class UpdateOrgMemberGroupRequest extends Message<UpdateOrgMemberGroupReq
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "wg.cosmo.platform.v1.UpdateOrgMemberGroupRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "userID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "orgMemberUserID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "groupId", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 1, name: "orgMemberUserID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "groups", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateOrgMemberGroupRequest {
Expand Down
30 changes: 30 additions & 0 deletions controlplane/migrations/0125_acoustic_jackpot.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
CREATE TABLE IF NOT EXISTS "organization_invitation_groups" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"invitation_id" uuid NOT NULL,
"group_id" uuid NOT NULL
);

-- Copy invitation groups to the new table
INSERT INTO "organization_invitation_groups"("invitation_id", "group_id")
SELECT "id" as "invitation_id", "group_id"
FROM "organization_invitations" "inv"
WHERE "inv"."group_id" IS NOT NULL

--> statement-breakpoint
ALTER TABLE "organization_invitations" DROP CONSTRAINT "organization_invitations_group_id_organization_groups_id_fk";
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "organization_invitation_groups" ADD CONSTRAINT "organization_invitation_groups_invitation_id_organization_invitations_id_fk" FOREIGN KEY ("invitation_id") REFERENCES "public"."organization_invitations"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "organization_invitation_groups" ADD CONSTRAINT "organization_invitation_groups_group_id_organization_groups_id_fk" FOREIGN KEY ("group_id") REFERENCES "public"."organization_groups"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "org_inv_invitation_idx" ON "organization_invitation_groups" USING btree ("invitation_id");--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "org_inv_group_id" ON "organization_invitation_groups" USING btree ("group_id");--> statement-breakpoint
ALTER TABLE "organization_invitations" DROP COLUMN IF EXISTS "group_id";
Loading
Loading