1
0
mirror of https://github.com/bitwarden/server synced 2025-12-12 22:33:45 +00:00

Move into and read ciphers from org subvaults

This commit is contained in:
Kyle Spearrin
2017-03-21 00:04:39 -04:00
parent 4779794599
commit ed8d5d69a4
22 changed files with 283 additions and 16 deletions

View File

@@ -1,5 +1,8 @@
using System;
using Core.Models.Data;
using System.Collections.Generic;
using Bit.Core.Models.Table;
using System.Linq;
namespace Bit.Core.Models.Api
{
@@ -16,6 +19,7 @@ namespace Bit.Core.Models.Api
Id = cipher.Id.ToString();
Type = cipher.Type;
RevisionDate = cipher.RevisionDate;
OrganizationId = cipher.OrganizationId?.ToString();
FolderId = cipher.FolderId?.ToString();
Favorite = cipher.Favorite;
@@ -30,10 +34,22 @@ namespace Bit.Core.Models.Api
}
public string Id { get; set; }
public string OrganizationId { get; set; }
public string FolderId { get; set; }
public Enums.CipherType Type { get; set; }
public bool Favorite { get; set; }
public dynamic Data { get; set; }
public DateTime RevisionDate { get; set; }
}
public class CipherDetailsResponseModel : CipherResponseModel
{
public CipherDetailsResponseModel(CipherDetails cipher, IEnumerable<SubvaultCipher> subvaultCipher)
: base(cipher, "cipherDetails")
{
SubvaultIds = subvaultCipher.Select(s => s.SubvaultId);
}
public IEnumerable<Guid> SubvaultIds { get; set; }
}
}