From faaa26c4e8a361d4ffc252552808147def2c76e2 Mon Sep 17 00:00:00 2001 From: giancarlo Date: Mon, 29 Apr 2024 21:14:33 +0700 Subject: [PATCH] Remove account id dependencies from role management This commit refactor the role management, removing the dependencies on account ids throughout our system. Changes include removing account id related attributes in the roles table schema and functions, modifying seed data and simplifying the role data provider code. This makes role structure more generic and simplifies the role handling process. --- .../home/[account]/members/page.tsx | 1 - apps/web/lib/database.types.ts | 27 +------ .../migrations/20221215192558_schema.sql | 81 ++----------------- apps/web/supabase/seed.sql | 4 +- .../database/account-permissions.test.sql | 9 +-- .../invitations/update-invitation-dialog.tsx | 5 +- .../invite-members-dialog-container.tsx | 7 +- .../members/roles-data-provider.tsx | 4 +- .../members/update-member-role-dialog.tsx | 5 +- packages/supabase/src/database.types.ts | 27 +------ 10 files changed, 20 insertions(+), 150 deletions(-) diff --git a/apps/web/app/(dashboard)/home/[account]/members/page.tsx b/apps/web/app/(dashboard)/home/[account]/members/page.tsx index ee398a1c6..9256e6efd 100644 --- a/apps/web/app/(dashboard)/home/[account]/members/page.tsx +++ b/apps/web/app/(dashboard)/home/[account]/members/page.tsx @@ -78,7 +78,6 @@ async function TeamAccountMembersPage({ params }: Params) {