Open neezzzy opened 1 year ago
if (req.isAuthenticated) {
const user = await User.findOne({ email: userAuth0.email });
if (user.userType === "student") {isStudent = true;}
if (user.userType === "company") {isCompany = true;}
}
const user = await User.findOne({ email: userAuth0.email });
res.render("projects", {
title: "Projects",
isAuthenticated: req.isAuthenticated,
user,
projects,
isStudent,
isCompany,
});
<% if (JSON.stringify(project.projectOwnerID._id) == JSON.stringify(user._id)) { %>
@mdroidian @Patricia-Fargetti Currently, our app allows a company to delete any project. We want only the company that created the project to be able to delete it.