Feat: Increase invite limit from 10 to 200 (#4618)

This commit is contained in:
Mike
2025-04-28 16:43:58 +02:00
committed by GitHub
parent baec1e9156
commit d6d8de41dc
5 changed files with 15 additions and 11 deletions
@@ -218,6 +218,7 @@ import {
throwIfAuthNotOk
} from '@/modules/shared/helpers/errorHelper'
import { withOperationLogging } from '@/observability/domain/businessLogging'
import { WorkspaceInvitesLimit } from '@/modules/workspaces/domain/constants'
const eventBus = getEventBus()
const getServerInfo = getServerInfoFactory({ db })
@@ -395,9 +396,9 @@ export = FF_WORKSPACES_MODULE_ENABLED
const { projectId } = args
const inviteCount = args.inputs.length
if (inviteCount > 10 && ctx.role !== Roles.Server.Admin) {
if (inviteCount > WorkspaceInvitesLimit && ctx.role !== Roles.Server.Admin) {
throw new InviteCreateValidationError(
'Maximum 10 invites can be sent at once by non admins'
`Maximum ${WorkspaceInvitesLimit} invites can be sent at once by non admins`
)
}
@@ -1168,9 +1169,9 @@ export = FF_WORKSPACES_MODULE_ENABLED
const { workspaceId } = args
const inviteCount = args.input.length
if (inviteCount > 10 && ctx.role !== Roles.Server.Admin) {
if (inviteCount > WorkspaceInvitesLimit && ctx.role !== Roles.Server.Admin) {
throw new InviteCreateValidationError(
'Maximum 10 invites can be sent at once by non admins'
`Maximum ${WorkspaceInvitesLimit} invites can be sent at once by non admins`
)
}