1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-26 22:31:30 +01:00

dont allow org id assignments on cipher creation

This commit is contained in:
Kyle Spearrin 2017-12-04 16:43:18 -05:00
parent 51534f159c
commit 6639c61ee1

View File

@ -33,13 +33,13 @@ namespace Bit.Core.Models.Api
public IdentityType Identity { get; set; }
public SecureNoteType SecureNote { get; set; }
public CipherDetails ToCipherDetails(Guid userId)
public CipherDetails ToCipherDetails(Guid userId, bool noOrg = false)
{
var cipher = new CipherDetails
{
Type = Type,
UserId = string.IsNullOrWhiteSpace(OrganizationId) ? (Guid?)userId : null,
OrganizationId = string.IsNullOrWhiteSpace(OrganizationId) ? (Guid?)null : new Guid(OrganizationId),
OrganizationId = null,
Edit = true
};
ToCipherDetails(cipher);