diff --git a/server/commands/userInviter.ts b/server/commands/userInviter.ts
index 5cd74556c5..e03083ff23 100644
--- a/server/commands/userInviter.ts
+++ b/server/commands/userInviter.ts
@@ -7,6 +7,7 @@ import { User, Team } from "@server/models";
import { UserFlag } from "@server/models/User";
import { APIContext } from "@server/types";
import { DomainNotAllowedError } from "@server/errors";
+import { can } from "@server/policies";
export type Invite = {
name: string;
@@ -43,9 +44,11 @@ export default async function userInviter(
// filter out any existing users in the system
const emails = normalizedInvites.map((invite) => invite.email);
- for (const email of emails) {
- if (!(await team.isDomainAllowed(email))) {
- throw DomainNotAllowedError();
+ if (!can(user, "update", team)) {
+ for (const email of emails) {
+ if (!(await team.isDomainAllowed(email))) {
+ throw DomainNotAllowedError();
+ }
}
}
diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json
index 7b654d2099..a16a1d3fb4 100644
--- a/shared/i18n/locales/en_US/translation.json
+++ b/shared/i18n/locales/en_US/translation.json
@@ -210,8 +210,6 @@
"Move document": "Move document",
"Moving": "Moving",
"Moving the document {{ title }} to the {{ newCollectionName }} collection will change permission for all workspace members from {{ prevPermission }} to {{ newPermission }}.": "Moving the document {{ title }} to the {{ newCollectionName }} collection will change permission for all workspace members from {{ prevPermission }} to {{ newPermission }}.",
- "More options": "More options",
- "Submenu": "Submenu",
"Collections could not be loaded, please reload the app": "Collections could not be loaded, please reload the app",
"Start view": "Start view",
"Install now": "Install now",
@@ -484,6 +482,7 @@
"Keep as link": "Keep as link",
"Mention": "Mention",
"Embed": "Embed",
+ "More options": "More options",
"Rename": "Rename",
"Insert after": "Insert after",
"Insert before": "Insert before",
@@ -1282,4 +1281,4 @@
"Caption": "Caption",
"Open": "Open",
"Error loading data": "Error loading data"
-}
\ No newline at end of file
+}