Package org.olat.core.util.servlets

Examples of org.olat.core.util.servlets.VFSDirContext$NamingContextEnumeration2


      try{
        usess.getSessionInfo().setLastClickTime();
      }catch(Throwable th){
          Tracing.logError("getResource failure: ", th, SecureWebdavServlet.class);
      }
      VFSDirContext fdc = (VFSDirContext)usess.getEntry("_DIRCTX");
      if (fdc != null) {
        fdc.setUserSession(usess);
        return fdc;
      }
     
      Identity identity = usess.getIdentity();
      // we need an identity...
      if (identity == null) return null;


      fdc = new VFSDirContext();
      fdc.setIdentity(identity);
      fdc.setUserSession(usess);
      fdc.setVirtualDocBase(WebDAVProviderFactory.getInstance().getMountableRoot(identity));
      fdc.setBuffer(super.input); // take inBuffer from DefaultServlet (configured via web.xml)
      // do not cache while debugging
      if (!Settings.isDebuging()) {
        usess.putEntry("_DIRCTX", fdc);
      }
     
View Full Code Here


//          return;
//      }

      // Check if operation allowed by OLAT VFS security callback
      DirContext resources = getResources(req);
      VFSDirContext vfsContext = (VFSDirContext) resources;
      String path = getRelativePath(req);
      if (!vfsContext.canWrite(path)) {
        resp.sendError(WebdavStatus.SC_FORBIDDEN);
        return;         
      }

      super.doPut(req, resp);
View Full Code Here

            return;
        }
       
        // Check if operation allowed by OLAT VFS security callback
        DirContext resources = getResources(req);
        VFSDirContext vfsContext = (VFSDirContext) resources;
        String path = getRelativePath(req);
        if (!vfsContext.canWrite(path)) {
          resp.sendError(WebdavStatus.SC_FORBIDDEN);
          return;         
        }

        if (isLocked(req)) {
View Full Code Here

            return;
        }
       
        // Check if operation allowed by OLAT VFS security callback
        DirContext resources = getResources(req);
        VFSDirContext vfsContext = (VFSDirContext) resources;
        String path = getRelativePath(req);
        if (!vfsContext.canWrite(path)) {
          resp.sendError(WebdavStatus.SC_FORBIDDEN);
          return;         
        }

        if (isLocked(req)) {
            resp.sendError(WebdavStatus.SC_LOCKED);
            return;
        }

        path = getRelativePath(req);

        if ((path.toUpperCase().startsWith("/WEB-INF")) ||
            (path.toUpperCase().startsWith("/META-INF"))) {
            resp.sendError(WebdavStatus.SC_FORBIDDEN);
            return;
        }

        // Retrieve the resources
        resources = getResources(req);

        if (resources == null) {
            resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
            return;
        }

        // Check if operation allowed by OLAT VFS security callback
        vfsContext = (VFSDirContext) resources;
        if (!vfsContext.canWrite(path)) {
          resp.sendError(WebdavStatus.SC_FORBIDDEN);
          return;         
        }
       
        boolean exists = true;
View Full Code Here

            return;
        }

        // Check if operation allowed by OLAT VFS security callback
        DirContext resources = getResources(req);
        VFSDirContext vfsContext = (VFSDirContext) resources;
        String path = getRelativePath(req);
        if (!vfsContext.canDelete(path)) {
          resp.sendError(WebdavStatus.SC_FORBIDDEN);
          return;         
        }

        if (isLocked(req)) {
View Full Code Here

            return;
        }

        // Check if operation allowed by OLAT VFS security callback
        DirContext resources = getResources(req);
        VFSDirContext vfsContext = (VFSDirContext) resources;
        String destinationPath = req.getHeader("Destination");
        if (!vfsContext.canWrite(destinationPath)) {
          resp.sendError(WebdavStatus.SC_FORBIDDEN);
          return;         
        }

        copyResource(req, resp);
View Full Code Here

            return;
        }

        // Check if operation allowed by OLAT VFS security callback
        DirContext resources = getResources(req);
        VFSDirContext vfsContext = (VFSDirContext) resources;
        String path = getRelativePath(req);
        if (!vfsContext.canRename(path)) {
          resp.sendError(WebdavStatus.SC_FORBIDDEN);
          return;         
        }

        if (isLocked(req)) {
View Full Code Here

            return;
        }
       
        // Check if operation allowed by OLAT VFS security callback
        DirContext resources = getResources(req);
        VFSDirContext vfsContext = (VFSDirContext) resources;
        String path = getRelativePath(req);
        if (!vfsContext.canWrite(path)) {
          resp.sendError(WebdavStatus.SC_FORBIDDEN);
          return;         
        }

View Full Code Here

            return;
        }

        // Check if operation allowed by OLAT VFS security callback
        DirContext resources = getResources(req);
        VFSDirContext vfsContext = (VFSDirContext) resources;
        String path = getRelativePath(req);
        if (!vfsContext.canWrite(path)) {
          resp.sendError(WebdavStatus.SC_FORBIDDEN);
          return;         
        }
       
        if (isLocked(req)) {
View Full Code Here

TOP

Related Classes of org.olat.core.util.servlets.VFSDirContext$NamingContextEnumeration2

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.