Skip to content

Commit

Permalink
refactor: remove spring security - skip redirect after first sign-on
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-elimu committed Jan 15, 2025
1 parent e6e856e commit 0288955
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/main/java/ai/elimu/web/content/MainContentController.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.commons.lang.StringUtils;

import org.apache.logging.log4j.Logger;
import ai.elimu.dao.AudioDao;
import ai.elimu.dao.ContributorDao;
Expand All @@ -23,8 +21,6 @@
import ai.elimu.dao.WordContributionEventDao;
import ai.elimu.dao.WordDao;
import ai.elimu.model.contributor.Contributor;
import ai.elimu.model.v2.enums.Environment;
import ai.elimu.web.context.EnvironmentContextLoaderListener;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -98,16 +94,6 @@ public String handleRequest(
Model model) {
logger.info("handleRequest");

// Check if the Contributor has not yet provided all required details
Contributor contributor = (Contributor) session.getAttribute("contributor");
if (StringUtils.isBlank(contributor.getEmail())) {
return "redirect:/content/contributor/add-email";
} else if (StringUtils.isBlank(contributor.getFirstName()) || StringUtils.isBlank(contributor.getLastName())) {
return "redirect:/content/contributor/edit-name";
} else if (StringUtils.isBlank(contributor.getMotivation()) && (EnvironmentContextLoaderListener.env != Environment.DEV)) {
return "redirect:/content/contributor/edit-motivation";
}

model.addAttribute("letterCount", letterDao.readCount());
model.addAttribute("soundCount", soundDao.readCount());
model.addAttribute("letterSoundCount", letterSoundDao.readCount());
Expand Down

0 comments on commit 0288955

Please sign in to comment.