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:
parent
51534f159c
commit
6639c61ee1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user