Merge remote-tracking branch 'origin' into service-account

This commit is contained in:
Tuan Dang
2023-04-04 11:08:28 +03:00
3 changed files with 18 additions and 15 deletions

View File

@@ -38,7 +38,7 @@
"jsrp": "^0.2.4",
"libsodium-wrappers": "^0.7.10",
"lodash": "^4.17.21",
"mongoose": "^6.10.1",
"mongoose": "^6.10.2",
"nodemailer": "^6.8.0",
"posthog-node": "^2.5.4",
"query-string": "^7.1.3",
@@ -7624,9 +7624,9 @@
}
},
"node_modules/mongoose": {
"version": "6.10.1",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.10.1.tgz",
"integrity": "sha512-QBXX27XXCEIi1zqimTBjlZsFFg2YzK9uQfuAIqG1AyIEeyKiiCaobD0Tst2ULwiX4PRB53VLRQvAqyu5TwvOZg==",
"version": "6.10.2",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.10.2.tgz",
"integrity": "sha512-9/AbheG2PiVVBWLx3S6LgCIEQNdMppjdnp/WH9nLGjFzjJeb9LiHNPEtsOGOm8qXmuICHMdbn5iUFAsLWWvpEw==",
"dependencies": {
"bson": "^4.7.0",
"kareem": "2.5.1",
@@ -7637,7 +7637,7 @@
"sift": "16.0.1"
},
"engines": {
"node": ">=14.0.0"
"node": ">=12.0.0"
},
"funding": {
"type": "opencollective",
@@ -18285,9 +18285,9 @@
}
},
"mongoose": {
"version": "6.10.1",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.10.1.tgz",
"integrity": "sha512-QBXX27XXCEIi1zqimTBjlZsFFg2YzK9uQfuAIqG1AyIEeyKiiCaobD0Tst2ULwiX4PRB53VLRQvAqyu5TwvOZg==",
"version": "6.10.2",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.10.2.tgz",
"integrity": "sha512-9/AbheG2PiVVBWLx3S6LgCIEQNdMppjdnp/WH9nLGjFzjJeb9LiHNPEtsOGOm8qXmuICHMdbn5iUFAsLWWvpEw==",
"requires": {
"bson": "^4.7.0",
"kareem": "2.5.1",

View File

@@ -29,7 +29,7 @@
"jsrp": "^0.2.4",
"libsodium-wrappers": "^0.7.10",
"lodash": "^4.17.21",
"mongoose": "^6.10.1",
"mongoose": "^6.10.2",
"nodemailer": "^6.8.0",
"posthog-node": "^2.5.4",
"query-string": "^7.1.3",

View File

@@ -56,12 +56,12 @@ export const OrgSettingsPage = () => {
const addIncidentContact = useAddIncidentContact();
const removeIncidentContact = useDeleteIncidentContact();
const [completeInviteLink, setcompleteInviteLink] = useState<string|undefined>("")
const [completeInviteLink, setcompleteInviteLink] = useState<string | undefined>('');
const isMoreUsersNotAllowed =
(orgUsers || []).length >= 5 &&
subscriptionPlan === plans.starter &&
host === 'https://app.infisical.com' &&
host === 'https://app.infisical.com' &&
currentWorkspace?._id !== '63ea8121b6e2b0543ba79616';
const onRenameOrg = async (name: string) => {
@@ -88,7 +88,7 @@ export const OrgSettingsPage = () => {
try {
await removeUserOrgMembership.mutateAsync({ orgId: currentOrg?._id, membershipId });
createNotification({
text: 'Successfully removed used from org',
text: 'Successfully removed user from org',
type: 'success'
});
} catch (error) {
@@ -103,11 +103,14 @@ export const OrgSettingsPage = () => {
if (!currentOrg?._id) return;
try {
const {data} = await addUserToOrg.mutateAsync({ organizationId: currentOrg?._id, inviteeEmail: email });
setcompleteInviteLink(data?.completeInviteLink)
const { data } = await addUserToOrg.mutateAsync({
organizationId: currentOrg?._id,
inviteeEmail: email
});
setcompleteInviteLink(data?.completeInviteLink);
// only show this notification when email is configured. A [completeInviteLink] will not be sent if smtp is configured
if (!data.completeInviteLink){
if (!data.completeInviteLink) {
createNotification({
text: 'Successfully invited user to the organization.',
type: 'success'