fix: Form link in Reroute Dialog gives 404 for members that aren't admin/owner of team (#17537)

* fix: Form link in Reroute Dialog gives 404 for members that aren't admin/owner of team

* NIT
This commit is contained in:
Anik Dhabal Babu authored and GitHub committed 2024-11-11 20:25:08 +05:30
1 parent cd15335eed
commit 4d38c6d0c7
5 files changed
+41 -1

No files matched your search

@@ -40,7 +40,10 @@ export const getServerSidePropsForSingleFormView = async function getServerSideP
const isFormCreateEditAllowed = (await import("../lib/isFormCreateEditAllowed")).isFormCreateEditAllowed;
if (!(await isFormCreateEditAllowed({ userId: user.id, formId, targetTeamId: null }))) {
return {
notFound: true,
redirect: {
permanent: false,
destination: "/403",
},
};
}