Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into service-account
Browse files Browse the repository at this point in the history
  • Loading branch information
dangtony98 committed Apr 4, 2023
2 parents aa53de9 + 84d46a4 commit 35d345f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
16 changes: 8 additions & 8 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
15 changes: 9 additions & 6 deletions frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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) {
Expand All @@ -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'
Expand Down

0 comments on commit 35d345f

Please sign in to comment.