Package org.olat.core.util.vfs.callbacks

Examples of org.olat.core.util.vfs.callbacks.VFSSecurityCallback.canRead()


 
  private int status = FolderCommandStatus.STATUS_SUCCESS;
 
  public Controller execute(FolderComponent folderComponent, UserRequest ureq, WindowControl wControl, Translator translator) {
    VFSSecurityCallback inheritedSecCallback = VFSManager.findInheritedSecurityCallback(folderComponent.getCurrentContainer());
    if (inheritedSecCallback != null && !inheritedSecCallback.canRead())
      throw new RuntimeException("Illegal read attempt: " + folderComponent.getCurrentContainerPath());
   
    // extract file
    String path = ureq.getModuleURI();
    MediaResource mr = null;
View Full Code Here


    FolderRunController folder = new FolderRunController(namedContainer, false, ureq, getWindowControl());
    previewVC.put("folder", folder.getInitialComponent());
    // get additional infos
    VFSSecurityCallback secCallback = new FolderNodeCallback(namedContainer.getRelPath(), ne, false, false, null);
    previewVC.contextPut("canUpload", Boolean.valueOf(secCallback.canWrite()));
    previewVC.contextPut("canDownload", Boolean.valueOf(secCallback.canRead()));
    Quota q = secCallback.getQuota();
    previewVC.contextPut("quotaKB", (q != null) ? q.getQuotaKB().toString() : "-");
    setInitialComponent(previewVC);
  }
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.