Package org.olat.core.logging

Examples of org.olat.core.logging.OLATSecurityException


    if (m == null) { // not mapped
      mr = NOTFOUND;
    } else {
      String mod = subInfo.substring(slashPos);
      // brasato:: can this happen at all, or does tomcat filter out - till now never reached - needs some little cpu cycles
      if (mod.indexOf("..") != -1) throw new OLATSecurityException("mapper path contained '..' : " + mod);
      // /bla/blu.html
      mr = m.handle(mod, hreq);
    }
    ServletUtil.serveResource(hreq, hres, mr);
  }
View Full Code Here


    MediaResource mr;
    if (m == null) { // not mapped
      mr = NOTFOUND;
    } else {
      String mod = subInfo.substring(slashPos);
      if (mod.indexOf("..") != -1) throw new OLATSecurityException("mapper path contained '..' : " + mod);
      // /bla/blu.html
      mr = m.handle(mod, hreq);
    }
    ServletUtil.serveResource(hreq, hres, mr);
   
View Full Code Here

      Manager mgr = ManagerFactory.getManager();
      if (!mgr.isIdentityPermittedOnResourceable(
          ureq.getIdentity(),
          Constants.PERMISSION_ACCESS,
          OresHelper.lookupType(this.getClass())))
        throw new OLATSecurityException("Insufficient permissions to access PersonalSettingsController");

      userConfig = new TabbedPane("userConfig", ureq.getLocale());

      hpec = new ProfileAndHomePageEditController(ureq, getWindowControl(), (Identity)DBFactory.getInstance().loadObject(ureq.getIdentity()), false);
      userConfig.addTab(translator.translate("tab.profile"), hpec.getInitialComponent());
View Full Code Here

    Manager mgr = ManagerFactory.getManager();
    if (!mgr.isIdentityPermittedOnResourceable(
        ureq.getIdentity(),
        Constants.PERMISSION_ACCESS,
        OresHelper.lookupType(this.getClass())))
      throw new OLATSecurityException("Insufficient permissions to access ChangePasswordController");

    myContent = createVelocityContainer("pwd");
    //adds "provider_..." variables to myContent
    exposePwdProviders(ureq.getIdentity());
View Full Code Here

        }else{
          //editor could not be created
          //message already pushed as Error Box
        }
       
      } else throw new OLATSecurityException("wanted to activate editor, but no according right");

    } else if (cmd.equals("groupmngt")) {
      if (hasCourseRight(CourseRights.RIGHT_GROUPMANAGEMENT) || isCourseAdmin) {
        currentToolCtr = new CourseGroupManagementMainController(ureq, getWindowControl(), course, BusinessGroup.TYPE_LEARNINGROUP);
        listenTo(currentToolCtr);
        all.setContent(currentToolCtr.getInitialComponent());
      } else throw new OLATSecurityException("clicked groupmanagement, but no according right");

    } else if (cmd.equals("rightmngt")) {
      if (isCourseAdmin) {
        currentToolCtr = new CourseGroupManagementMainController(ureq, getWindowControl(), course, BusinessGroup.TYPE_RIGHTGROUP);
        listenTo(currentToolCtr);
        all.setContent(currentToolCtr.getInitialComponent());
      } else throw new OLATSecurityException("clicked rightmanagement, but no according right");

    } else if (cmd.equals("statistic")) {
      if (hasCourseRight(CourseRights.RIGHT_STATISTICS) || isCourseAdmin) {
        currentToolCtr = new StatisticMainController(ureq, getWindowControl(), course);
        listenTo(currentToolCtr);
        all.setContent(currentToolCtr.getInitialComponent());
      } else throw new OLATSecurityException("clicked statistic, but no according right");

    }else if (cmd.equals("archiver")) {
      if (hasCourseRight(CourseRights.RIGHT_ARCHIVING) || isCourseAdmin) {
        currentToolCtr = new ArchiverMainController(ureq, getWindowControl(), course, new IArchiverCallback() {
          public boolean mayArchiveQtiResults() {
            return true;
          }

          public boolean mayArchiveLogfiles() {
            return true;
          }

          public boolean mayArchiveCoursestructure() {
            return true;
          }

          public boolean mayArchiveProperties() {
            return true;
          }

          public boolean mayArchiveHandedInTasks() {
            return true;
          }

          public boolean mayArchiveForums() {
            return true;
          }

          public boolean mayArchiveDialogs() {
            return true;
          }

          public boolean mayBringTogether() {
            return true;
          }

          public boolean mayArchiveWikis() {
            return true;
          }

          public boolean mayArchiveProjectBroker() {
            return true;
          }

        });
        listenTo(currentToolCtr);
        all.setContent(currentToolCtr.getInitialComponent());
      } else throw new OLATSecurityException("clicked archiver, but no according right");

    } else if (cmd.equals("assessment")) {
      launchAssessmentTool(ureq, null);

    } else if (cmd.equals("efficiencystatement")) {
View Full Code Here

          new CoachingGroupAccessAssessmentCallback());
      assessmentToolCtr.activate(ureq, viewIdentifier);
      currentToolCtr = assessmentToolCtr;
      listenTo(currentToolCtr);
      all.setContent(currentToolCtr.getInitialComponent());
    } else throw new OLATSecurityException("clicked assessment tool in course::" + course.getResourceableId()
        + ", but no right to launch it. Username::" + ureq.getIdentity().getName());
  }
View Full Code Here

      cmc = new CloseableModalController(getWindowControl(), translate("close"), subController.getInitialComponent());
      cmc.activate();
      listenTo(cmc);
    } else if (source == pwLink) {
      // double-check if allowed first
      if (!UserModule.isPwdchangeallowed()) throw new OLATSecurityException("chose password to be changed, but disallowed by config");
      subController = new PwChangeController(ureq, getWindowControl());
      listenTo(subController);
      cmc = new CloseableModalController(getWindowControl(), translate("close"), subController.getInitialComponent());
      cmc.activate();
      listenTo(cmc);
View Full Code Here

  private void doNewThread(UserRequest ureq) {
    //after creating a thread
    Message m = fm.createMessage();
    m = msgEditCtr.getMessageBackAfterEdit();
   
    if (!focallback.mayOpenNewThread()) throw new OLATSecurityException("not allowed to open new thread in forum " + forum.getKey());
    // open a new thread
    fm.addTopMessage(ureq.getIdentity(), forum, m);
    // if notification is enabled -> notify the publisher about news
    if (subsContext != null) {
      NotificationsManager.getInstance().markPublisherNews(subsContext, ureq.getIdentity());
View Full Code Here

    // Manually set translator that uses a fallback translator to the login module
    // Can't use constructor with fallback translator because it gets overriden by setBasePackage call above
    setTranslator(Util.createPackageTranslator(this.getClass(), ureq.getLocale(), Util.createPackageTranslator(LoginModule.class, ureq.getLocale())));
   
   
    if (!ShibbolethModule.isEnableShibbolethLogins()) throw new OLATSecurityException(
        "Tried to access shibboleth wayf but shibboleth is not enabled.");
    loginComp = createVelocityContainer("shibbolethlogin");
   
    if (LoginModule.isGuestLoginLinksEnabled()) {
      anoLink = LinkFactory.createLink("menu.guest", loginComp, this);
View Full Code Here

    Manager mgr = ManagerFactory.getManager();
    if (!mgr.isIdentityPermittedOnResourceable(
        ureq.getIdentity(),
        Constants.PERMISSION_ACCESS,
        OresHelper.lookupType(this.getClass())))
      throw new OLATSecurityException("Insufficient permissions to access UserChangePasswordController");

    user = changeableUser;
    chPwdForm = new ChangeUserPasswordForm(ureq, wControl, user);
    listenTo(chPwdForm);
   
View Full Code Here

TOP

Related Classes of org.olat.core.logging.OLATSecurityException

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.