File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
apps/studio/src/server/modules/user Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { toZonedTime } from "date-fns-tz"
44
55import type { ResourcePermission , Site , User } from "../database"
66import type { BulkSendAccountDeactivationWarningEmailsProps } from "./types"
7+ import { env } from "~/env.mjs"
78import {
89 sendAccountDeactivationEmail ,
910 sendAccountDeactivationWarningEmail ,
@@ -229,6 +230,15 @@ export const bulkDeactivateInactiveUsers = async (): Promise<void> => {
229230 return
230231 }
231232
233+ if (
234+ env . NEXT_PUBLIC_APP_ENV !== "production" &&
235+ env . NEXT_PUBLIC_APP_ENV !== "test"
236+ ) {
237+ // NOTE: We do not notify users in UAT or staging environments, so as to
238+ // avoid inducing unnecessary panic
239+ return
240+ }
241+
232242 for ( const { user, siteIds } of deactivatedUsersAndSiteIds ) {
233243 if ( siteIds . length === 0 ) continue
234244
You can’t perform that action at this time.
0 commit comments