mirror of
https://github.com/bitwarden/server.git
synced 2025-07-19 00:21:35 -05:00
pub/priv keys and share updates
This commit is contained in:
@ -33,16 +33,6 @@ namespace Bit.Api.Models
|
||||
default:
|
||||
throw new ArgumentException("Unsupported " + nameof(Type) + ".");
|
||||
}
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(cipher.Shares))
|
||||
{
|
||||
var shares = JsonConvert.DeserializeObject<IEnumerable<Cipher.Share>>(cipher.Shares);
|
||||
var userShare = shares.FirstOrDefault(s => s.UserId == userId);
|
||||
if(userShare != null)
|
||||
{
|
||||
Key = userShare.Key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
|
@ -26,16 +26,6 @@ namespace Bit.Api.Models
|
||||
Id = cipher.Id.ToString();
|
||||
Name = data.Name;
|
||||
RevisionDate = cipher.RevisionDate;
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(cipher.Shares))
|
||||
{
|
||||
var shares = JsonConvert.DeserializeObject<IEnumerable<Cipher.Share>>(cipher.Shares);
|
||||
var userShare = shares.FirstOrDefault(s => s.UserId == userId);
|
||||
if(userShare != null)
|
||||
{
|
||||
Key = userShare.Key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
|
@ -32,16 +32,6 @@ namespace Bit.Api.Models
|
||||
Password = data.Password;
|
||||
Notes = data.Notes;
|
||||
RevisionDate = cipher.RevisionDate;
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(cipher.Shares))
|
||||
{
|
||||
var shares = JsonConvert.DeserializeObject<IEnumerable<Cipher.Share>>(cipher.Shares);
|
||||
var userShare = shares.FirstOrDefault(s => s.UserId == userId);
|
||||
if(userShare != null)
|
||||
{
|
||||
Key = userShare.Key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
|
Reference in New Issue
Block a user