mirror of
https://github.com/bitwarden/server.git
synced 2025-04-21 21:15:10 -05: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 IdentityType Identity { get; set; }
|
||||||
public SecureNoteType SecureNote { get; set; }
|
public SecureNoteType SecureNote { get; set; }
|
||||||
|
|
||||||
public CipherDetails ToCipherDetails(Guid userId)
|
public CipherDetails ToCipherDetails(Guid userId, bool noOrg = false)
|
||||||
{
|
{
|
||||||
var cipher = new CipherDetails
|
var cipher = new CipherDetails
|
||||||
{
|
{
|
||||||
Type = Type,
|
Type = Type,
|
||||||
UserId = string.IsNullOrWhiteSpace(OrganizationId) ? (Guid?)userId : null,
|
UserId = string.IsNullOrWhiteSpace(OrganizationId) ? (Guid?)userId : null,
|
||||||
OrganizationId = string.IsNullOrWhiteSpace(OrganizationId) ? (Guid?)null : new Guid(OrganizationId),
|
OrganizationId = null,
|
||||||
Edit = true
|
Edit = true
|
||||||
};
|
};
|
||||||
ToCipherDetails(cipher);
|
ToCipherDetails(cipher);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user