Package org.gtugs.service.security

Examples of org.gtugs.service.security.AppEngineUserService


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

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

    Event event = retrieveEvent(eventId);

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

      return new ModelAndView("admin_error", model);
    }

    Chapter chapter = retrieveChapter(event.getChapterId());

    if (chapter == null) {
      String errorText = "Failed to retrieve chapter with ID \"" +
          event.getChapterId() + "\" -- 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 the " +
          "chapter associated with this event. 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;
    Event event = retrieveEvent(cmd.getId());
    AppEngineUserService userService = new AppEngineUserService();

    if (event == null) {
      String errorText = "Failed to update event with ID \"" + cmd.getId() +
          "\" -- event not found.";
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.