Feat: Increase invite limit from 10 to 200 (#4618)
This commit is contained in:
@@ -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`
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user