protected void btnMove_Click(object sender, EventArgs e) { if (!IsValid) { return; } string destinationFolderID = ddlDestination.SelectedValue; if (destinationFolderID == targetFolder.ID) { throw new ConciergeClientException(MemberSuite.SDK.Concierge.ConciergeErrorCode.IllegalParameter, "The source file already resides in the specified folder. Please choose another destination folder."); } if (!DocumentsLogic.CanWriteTo(LoadObjectFromAPI <msFileFolder>(destinationFolderID), ConciergeAPI.CurrentEntity.ID)) { throw new ConciergeClientException(MemberSuite.SDK.Concierge.ConciergeErrorCode.IllegalParameter, "You do not have write permission for the destination folder."); } targetFile.FileFolder = destinationFolderID; SaveObject(targetFile); GoTo("BrowseFileFolder.aspx?contextID=" + targetFolder.ID, string.Format("File '{0}' has been moved successfully.", targetFile.Name)); }
protected override bool CheckSecurity() { if (!base.CheckSecurity()) { return(false); } return(DocumentsLogic.CanWriteTo(targetFolder, ConciergeAPI.CurrentEntity.ID)); }
protected void rptFolders_OnItemCommand(object source, RepeaterCommandEventArgs e) { var folderId = e.CommandArgument.ToString(); msFileFolder f = LoadObjectFromAPI <msFileFolder>(folderId); if (!DocumentsLogic.CanWriteTo(f, ConciergeAPI.CurrentEntity.ID)) { throw new ConciergeClientException(ConciergeErrorCode.AccessDenied, "You do not have access the delete the specified folder."); } using (var api = GetServiceAPIProxy()) api.DeleteFolderTree(folderId); QueueBannerMessage("The folder (and all subfolders and files) have been successfully deleted."); Refresh(); }
private void establishWhetherUserHasUploadAccess() { hasWriteAccess = DocumentsLogic.CanWriteTo(targetFolder, ConciergeAPI.CurrentEntity.ID); }