Examples of AccessViolationException


Examples of net.pleso.framework.client.bl.exceptions.AccessViolationException

      throw new NullPointerException(FrameworkLocale.messages().error_datasource_cant_be_null());
    }
   
    // check authorization
    if (!AuthorizationProvider.isObjectAuthorized(dataSource)) {
      throw new AccessViolationException(FrameworkLocale.messages().error_not_authorized());
    }
   
    if (dataGrid.getDataSource() == null) {
      // Fake binding empty data for header rendering.
      dataGrid.setDataSource(new IDataRow[0]);
View Full Code Here

Examples of ru.org.linux.auth.AccessViolationException

    @RequestParam("voteid") int voteid
  ) throws Exception {
    Template tmpl = Template.getTemplate(request);

    if (!tmpl.isSessionAuthorized()) {
      throw new AccessViolationException("Not authorized");
    }

    User user = tmpl.getCurrentUser();

    Poll poll = pollDao.getCurrentPoll();
View Full Code Here

Examples of ru.org.linux.auth.AccessViolationException

    HttpServletRequest request
  ) throws Exception {
    Template tmpl = Template.getTemplate(request);

    if (!tmpl.isSessionAuthorized()) {
      throw new AccessViolationException("Not authorized");
    }

    Map<String, Object> params = new HashMap<>();

    Topic msg = messageDao.getById(msgid);
View Full Code Here

Examples of ru.org.linux.auth.AccessViolationException

    Map<String, Object> params = new HashMap<>();

    Template tmpl = Template.getTemplate(request);

    if (!tmpl.isSessionAuthorized()) {
      throw new AccessViolationException("нет авторизации");
    }

    params.put("msgid", msgid);

    Comment comment = commentService.getById(msgid);

    if (comment.isDeleted()) {
      throw new UserErrorException("комментарий уже удален");
    }

    int topicId = comment.getTopicId();

    Topic topic = messageDao.getById(topicId);

    if (topic.isDeleted()) {
      throw new AccessViolationException("тема удалена");
    }

    params.put("topic", topic);

    CommentList comments = commentService.getCommentList(topic, tmpl.isModeratorSession());
View Full Code Here

Examples of ru.org.linux.auth.AccessViolationException

    }

    Template tmpl = Template.getTemplate(request);

    if (!tmpl.isSessionAuthorized()) {
      throw new AccessViolationException("нет авторизации");
    }

    User user = tmpl.getCurrentUser();
    user.checkBlocked();
    user.checkAnonymous();
View Full Code Here

Examples of ru.org.linux.auth.AccessViolationException

            commentRequest.getTopic(),
            tmpl.getCurrentUser()
    );

    if (!editable) {
      throw new AccessViolationException("у Вас нет прав на редактирование этого сообщения");
    }

    if (commentRequest.isPreviewMode() || errors.hasErrors() && comment == null) {
      ModelAndView modelAndView = new ModelAndView("edit_comment", formParams);
      modelAndView.addObject("ipBlockInfo", ipBlockInfo);
View Full Code Here

Examples of ru.org.linux.auth.AccessViolationException

    @RequestParam(value = "firstLetter", required = false, defaultValue = "") String firstLetter,
    @RequestParam("tagName") String oldTagName
  ) throws AccessViolationException {
    Template template = Template.getTemplate(request);
    if (!template.isModeratorSession()) {
      throw new AccessViolationException(REJECT_REASON);
    }
    TagRequest.Change tagRequestChange = new TagRequest.Change();
    tagRequestChange.setOldTagName(oldTagName);
    tagRequestChange.setTagName(oldTagName);
    ModelAndView modelAndView = new ModelAndView("tags-change");
View Full Code Here

Examples of ru.org.linux.auth.AccessViolationException

    @ModelAttribute("tagRequestChange") TagRequest.Change tagRequestChange,
    Errors errors
  ) throws AccessViolationException {
    Template template = Template.getTemplate(request);
    if (!template.isModeratorSession()) {
      throw new AccessViolationException(REJECT_REASON);
    }

    tagModificationService.change(tagRequestChange.getOldTagName(), tagRequestChange.getTagName(), errors);

    if (!errors.hasErrors()) {
View Full Code Here

Examples of ru.org.linux.auth.AccessViolationException

    @RequestParam(value = "firstLetter", required = false, defaultValue = "") String firstLetter,
    @RequestParam("tagName") String oldTagName
  ) throws AccessViolationException {
    Template template = Template.getTemplate(request);
    if (!template.isModeratorSession()) {
      throw new AccessViolationException(REJECT_REASON);
    }
    TagRequest.Delete tagRequestDelete = new TagRequest.Delete();
    tagRequestDelete.setOldTagName(oldTagName);
    ModelAndView modelAndView = new ModelAndView("tags-delete");
    modelAndView.addObject("firstLetter", firstLetter);
View Full Code Here

Examples of ru.org.linux.auth.AccessViolationException

    @ModelAttribute("tagRequestDelete") TagRequest.Delete tagRequestDelete,
    Errors errors
  ) throws AccessViolationException {
    Template template = Template.getTemplate(request);
    if (!template.isModeratorSession()) {
      throw new AccessViolationException(REJECT_REASON);
    }

    tagModificationService.delete(tagRequestDelete.getOldTagName(), tagRequestDelete.getTagName(), errors);

    if (!errors.hasErrors()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.