mirror of
https://github.com/bitwarden/server
synced 2025-12-19 17:53:44 +00:00
dont allow org id assignments on cipher creation
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user