Commit bcac2a06 authored by Dannon Baker's avatar Dannon Baker
Browse files

Add user authentication check in router before entering workflow landing

parent 9dda9979
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -523,6 +523,22 @@ export function getRouter(Galaxy) {
                            public: route.query.public.toLowerCase() === "true",
                            secret: route.query.client_secret,
                        }),
                        beforeEnter: async (to, from, next) => {
                            const userStore = useUserStore();
                            await userStore.loadUser(false);
                            if (userStore.isAnonymous) {
                                next({
                                    path: "/login/start",
                                    query: {
                                        redirect: `/workflow_landings/${to.params.uuid}?public=${to.query.public}&client_secret=${to.query.client_secret}`,
                                    },
                                });
                                return;
                            }
                            // const activityStore = useActivityStore("default");
                            // activityStore.closeSideBar();
                            next();
                        },
                    },
                    {
                        path: "user",