webdav portal owa edit fixes

This commit is contained in:
vfedosevich 2015-02-02 03:41:44 -08:00
parent aedc7ec08e
commit 9edf1f8d93
13 changed files with 133 additions and 21 deletions

View file

@ -173,6 +173,20 @@ namespace WebsitePanel.WebDav.Core.Managers
resource.Upload(bytes);
}
public void LockFile(string path)
{
var resource = new WebDavResource();
var fileUrl = new Uri(WebDavAppConfigManager.Instance.WebdavRoot)
.Append(WspContext.User.OrganizationId)
.Append(path);
resource.SetHref(fileUrl);
resource.SetCredentials(new NetworkCredential(WspContext.User.Login, _cryptography.Decrypt(WspContext.User.EncryptedPassword)));
resource.Lock();
}
public void DeleteResource(string path)
{
path = RemoveLeadingFromPath(path, "office365");