decrypt attachment with org id

This commit is contained in:
Kyle Spearrin 2018-01-26 09:13:30 -05:00
parent 6afccc2aea
commit 9a399e06f3
2 changed files with 3 additions and 3 deletions

View file

@ -12,10 +12,10 @@ namespace Bit.App.Models.Page
public long Size { get; set; }
public string Url { get; set; }
public Attachment(Models.Attachment attachment)
public Attachment(Models.Attachment attachment, string orgId)
{
Id = attachment.Id;
Name = attachment.FileName?.Decrypt();
Name = attachment.FileName?.Decrypt(orgId);
SizeName = attachment.SizeName;
Size = attachment.Size;
Url = attachment.Url;

View file

@ -231,7 +231,7 @@ namespace Bit.App.Pages
}
var attachmentsToAdd = _cipher.Attachments
.Select(a => new VaultAttachmentsPageModel.Attachment(a))
.Select(a => new VaultAttachmentsPageModel.Attachment(a, _cipher.OrganizationId))
.OrderBy(s => s.Name);
PresentationAttchments.ResetWithRange(attachmentsToAdd);
AdjustContent();