[WEB-1309] fix: auth fixes (#4456)
* dev: magic link login and email password disable * dev: user account deactivation * dev: change nginx conf routes * feat: changemod space * fix: space app dir fixes * dev: invalidate cache for instances when creating workspace * dev: update email templates for test email * dev: fix build errors * fix: auth fixes and improvement (#4452) * chore: change password api updated and missing password error code added * chore: auth helper updated * chore: disable send code input suggestion * chore: change password function updated * fix: application error on sign in page * chore: change password validation added and enhancement * dev: space base path in web * dev: admin user deactivated * dev: user and instance admin session endpoint * fix: last_workspace_id endpoint updated * fix: magic sign in and email password check added --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com> Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com> Co-authored-by: guru_sainath <gurusainath007@gmail.com>
This commit is contained in:
parent
ab6f1ef780
commit
9b7b23f5a2
44 changed files with 1114 additions and 319 deletions
|
|
@ -21,14 +21,13 @@ import { ROLE } from "@/constants/workspace";
|
|||
// helpers
|
||||
import { truncateText } from "@/helpers/string.helper";
|
||||
import { getUserRole } from "@/helpers/user.helper";
|
||||
import { useEventTracker, useUser, useWorkspace } from "@/hooks/store";
|
||||
import { useEventTracker, useUser, useUserProfile, useWorkspace } from "@/hooks/store";
|
||||
import DefaultLayout from "@/layouts/default-layout";
|
||||
// types
|
||||
import { NextPageWithLayout } from "@/lib/types";
|
||||
// wrappers
|
||||
import { AuthenticationWrapper } from "@/lib/wrappers";
|
||||
// services
|
||||
import { UserService } from "@/services/user.service";
|
||||
import { WorkspaceService } from "@/services/workspace.service";
|
||||
// images
|
||||
import emptyInvitation from "public/empty-state/invitation.svg";
|
||||
|
|
@ -36,7 +35,6 @@ import BlackHorizontalLogo from "public/plane-logos/black-horizontal-with-blue-l
|
|||
import WhiteHorizontalLogo from "public/plane-logos/white-horizontal-with-blue-logo.svg";
|
||||
|
||||
const workspaceService = new WorkspaceService();
|
||||
const userService = new UserService();
|
||||
|
||||
const UserInvitationsPage: NextPageWithLayout = observer(() => {
|
||||
// states
|
||||
|
|
@ -47,6 +45,8 @@ const UserInvitationsPage: NextPageWithLayout = observer(() => {
|
|||
// store hooks
|
||||
const { captureEvent, joinWorkspaceMetricGroup } = useEventTracker();
|
||||
const { data: currentUser } = useUser();
|
||||
const { updateUserProfile } = useUserProfile();
|
||||
|
||||
const { fetchWorkspaces } = useWorkspace();
|
||||
// next-themes
|
||||
const { theme } = useTheme();
|
||||
|
|
@ -95,8 +95,7 @@ const UserInvitationsPage: NextPageWithLayout = observer(() => {
|
|||
state: "SUCCESS",
|
||||
element: "Workspace invitations page",
|
||||
});
|
||||
userService
|
||||
.updateUser({ last_workspace_id: redirectWorkspace?.id })
|
||||
updateUserProfile({ last_workspace_id: redirectWorkspace?.id })
|
||||
.then(() => {
|
||||
setIsJoiningWorkspaces(false);
|
||||
fetchWorkspaces().then(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue