fix: Add adminReview option to allow impersonating org members (#14275)
* added layouts for moving teams step * added admin section for org creation step * extended org creation to also move existing teams * wip * wip * wip * further changes * Add checkout for org in onboarding * Fix ts errors * Self review feedback * Self review addressed * Fix unit tests * Fix ts error * Seans feedback addressed * feat: fix correct accounts pending * fix: unit tests for new invite member permissions * tests: org admin onboarding tests for existing user * tests: Inital user self serve flow * chore: update teamAndUserFixture to create X amount of teams * chore: add testId to card actionButton * test: add test-Id to continue or checkout button * tests: add tests for migrating existing teams * feat: match new designs * fix: isAdminCheck * chore: fix pricing copy * fix: flacky tests * Fix tests? * More test fixes * Check all checkboxes * Fix type error * Fix failing test and typescript issues * Fix unpaid org allowing auto-add users * Add self-serve flag * Skip tests * Add adminReview option * Fixes * Add server checks for impersonation * Improved error * feat: extract - and disalow updating from org uset list if not reviewed --------- Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: sean-brydon <[email protected]> Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
14 files changed
+98
-18
No files matched your search
@@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "OrganizationSettings" ADD COLUMN "isAdminReviewed" BOOLEAN NOT NULL DEFAULT false;
|
||||
|
||||
-- User written Query: Update OrganizationSettings table to mark all existing organizations as reviewed as all organizations are created by ADMIN only so far.
|
||||
UPDATE "OrganizationSettings" SET "isAdminReviewed" = true;
|
||||
@@ -392,9 +392,13 @@ model OrganizationSettings {
|
||||
organization Team @relation(fields: [organizationId], references: [id], onDelete: Cascade)
|
||||
organizationId Int @unique
|
||||
isOrganizationConfigured Boolean @default(false)
|
||||
// It decides if new organization members can be auto-accepted or not
|
||||
isOrganizationVerified Boolean @default(false)
|
||||
orgAutoAcceptEmail String
|
||||
lockEventTypeCreationForUsers Boolean @default(false)
|
||||
// It decides if instance ADMIN has reviewed the organization or not.
|
||||
// It is used to allow super sensitive operations like 'impersonation of Org members by Org admin'
|
||||
isAdminReviewed Boolean @default(false)
|
||||
dSyncData DSyncData?
|
||||
}
|
||||
|
||||
|
||||
@@ -353,6 +353,7 @@ export const orgSettingsSchema = z
|
||||
.object({
|
||||
isOrganizationVerified: z.boolean().optional(),
|
||||
isOrganizationConfigured: z.boolean().optional(),
|
||||
isAdminReviewed: z.boolean().optional(),
|
||||
orgAutoAcceptEmail: z.string().optional(),
|
||||
})
|
||||
.nullable();
|
||||
|
||||
Reference in new issue
Block a user