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

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


    VFSSecurityCallback secCallback = VFSManager.findInheritedSecurityCallback(container);
    if (secCallback != null) {
      if (secCallback.canDeleteRevisionsPermanently()) {
        deletedFilesListTableCtr.addMultiSelectAction("delete", CMD_DELETE);
      }
      if (secCallback.canWrite()) {
        deletedFilesListTableCtr.addMultiSelectAction("version.restore", CMD_RESTORE);
      }
    }

    deletedFilesListTableCtr.addMultiSelectAction("cancel", CMD_CANCEL);
View Full Code Here


    namedContainer.setLocalSecurityCallback(new ReadOnlyCallback());
    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.