Package org.gtugs.service.security

Examples of org.gtugs.service.security.AppEngineUserService


  @RequestMapping("/admin")
  public ModelAndView handleRequest(HttpServletRequest request,
      HttpServletResponse response) throws ServletException, IOException {
    Map<String, Object> model = new HashMap<String, Object>();

    AppEngineUserService userService = new AppEngineUserService();
    model.put("userService", userService);

    List<List<Chapter>> chapters = chapterManager
        .getChaptersGroupedByCountry();
    model.put("chapters", chapters);
View Full Code Here


      HttpServletResponse response, BindException errors) {
    Map<String, Object> map = new HashMap<String, Object>();
    String chapterId = request.getParameter("id");
    Map model = errors.getModel();

    AppEngineUserService userService = new AppEngineUserService();
    map.put("userService", userService);
    model.put("model", map);

    Chapter chapter = retrieveChapter(chapterId);

    if (chapter == null) {
      String errorText = "Failed to retrieve chapter with ID \"" + chapterId +
          "\" -- chapter not found.";
      model.put("errorText", errorText);

      return new ModelAndView("admin_error", model);
    }
    if (!hasAccess(userService, chapter)) {
      userService.setAfterLogoutEndpoint("/admin");

      String errorText = "You are not listed as an organizer for this " +
          "chapter. Please sign in with an organizer's account to access " +
          "this page.";
      model.put("errorText", errorText);
View Full Code Here

  @Override
  public ModelAndView onSubmit(Object command) throws ServletException {
    Event cmd = (Event) command;
    Chapter chapter = retrieveChapter(cmd.getChapterId());
    AppEngineUserService userService = new AppEngineUserService();

    if (chapter == null) {
      String errorText = "Failed to update chapter with ID \"" +
          cmd.getChapterId() + "\" -- chapter not found.";
View Full Code Here

  @RequestMapping("/admin/report.jsp")
  public ModelAndView handleRequest() throws ServletException, IOException {
    Map<String, Object> model = new HashMap<String, Object>();

    AppEngineUserService userService = new AppEngineUserService();
    model.put("userService", userService);

    List<Chapter> allChapters = chapterManager.getChapters();
    List<Event> allEvents = eventManager.getEvents();
View Full Code Here

  protected ModelAndView showForm(HttpServletRequest request,
      HttpServletResponse response, BindException errors) {
    Map<String, Object> map = new HashMap<String, Object>();
    Map model = errors.getModel();

    AppEngineUserService userService = new AppEngineUserService();
    map.put("userService", userService);
    model.put("model", map);

    if (!hasAccess(userService)) {
      userService.setAfterLogoutEndpoint("/admin");

      String errorText = "This page is restricted to site administrators. " +
          "Please sign in again with an administrator account to access " +
          "this page.";
      model.put("errorText", errorText);
View Full Code Here

    return chapter;
  }

  @Override
  public ModelAndView onSubmit(Object command) throws ServletException {
    AppEngineUserService userService = new AppEngineUserService();

    if (!hasAccess(userService)) {
      String errorText = "This page is restricted to site administrators. " +
          "Please sign in again with an administrator account to access " +
          "this page.";
View Full Code Here

      HttpServletResponse response, BindException errors) {
    Map<String, Object> map = new HashMap<String, Object>();
    String chapterId = request.getParameter("id");
    Map model = errors.getModel();

    AppEngineUserService userService = new AppEngineUserService();
    map.put("userService", userService);
    model.put("model", map);

    Chapter chapter = retrieveChapter(chapterId);

    if (chapter == null) {
      String errorText = "Failed to retrieve chapter with ID \"" + chapterId +
          "\" -- chapter not found.";
      model.put("errorText", errorText);

      return new ModelAndView("admin_error", model);
    }
    if (!hasAccess(userService, chapter)) {
      userService.setAfterLogoutEndpoint("/admin");

      String errorText = "You are not listed as an organizer for this " +
          "chapter. Please sign in with an organizer's account to access " +
          "this page.";
      model.put("errorText", errorText);
View Full Code Here

  @Override
  public ModelAndView onSubmit(Object command) throws ServletException {
    Chapter cmd = (Chapter) command;
    Chapter chapter = retrieveChapter(cmd.getId());
    AppEngineUserService userService = new AppEngineUserService();

    if (chapter == null) {
      String errorText = "Failed to update chapter with ID \"" + cmd.getId() +
          "\" -- chapter not found.";
View Full Code Here

  protected ModelAndView showForm(HttpServletRequest request,
      HttpServletResponse response, BindException errors) {
    Map<String, Object> map = new HashMap<String, Object>();
    Map model = errors.getModel();

    AppEngineUserService userService = new AppEngineUserService();
    map.put("userService", userService);
    model.put("model", map);

    if (!hasAccess(userService)) {
      userService.setAfterLogoutEndpoint("/admin");

      String errorText = "This page is restricted to site administrators. " +
          "Please sign in again with an administrator account to access " +
          "this page.";
      model.put("errorText", errorText);
View Full Code Here

    return new ModelAndView(getFormView(), model);
  }

  @Override
  public ModelAndView onSubmit(Object command) throws ServletException {
    AppEngineUserService userService = new AppEngineUserService();

    if (!hasAccess(userService)) {
      String errorText = "This page is restricted to site administrators. " +
          "Please sign in again with an administrator account to access " +
          "this page.";
View Full Code Here

TOP

Related Classes of org.gtugs.service.security.AppEngineUserService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.