[PM-9959] Ensure cipherType defaults to CipherType.Login if none is available
This commit is contained in:
parent
8827fd7067
commit
7090e3fa96
|
@ -40,7 +40,7 @@ import { OpenAttachmentsComponent } from "../attachments/open-attachments/open-a
|
||||||
class QueryParams {
|
class QueryParams {
|
||||||
constructor(params: Params) {
|
constructor(params: Params) {
|
||||||
this.cipherId = params.cipherId;
|
this.cipherId = params.cipherId;
|
||||||
this.type = parseInt(params.type, null);
|
this.type = params.type != undefined ? parseInt(params.type, null) : undefined;
|
||||||
this.clone = params.clone === "true";
|
this.clone = params.clone === "true";
|
||||||
this.folderId = params.folderId;
|
this.folderId = params.folderId;
|
||||||
this.organizationId = params.organizationId;
|
this.organizationId = params.organizationId;
|
||||||
|
@ -56,7 +56,7 @@ class QueryParams {
|
||||||
/**
|
/**
|
||||||
* The type of cipher to create.
|
* The type of cipher to create.
|
||||||
*/
|
*/
|
||||||
type: CipherType;
|
type?: CipherType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether to clone the cipher.
|
* Whether to clone the cipher.
|
||||||
|
|
|
@ -48,7 +48,7 @@ export class DefaultCipherFormConfigService implements CipherFormConfigService {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
mode,
|
mode,
|
||||||
cipherType,
|
cipherType: cipher?.type ?? cipherType ?? CipherType.Login,
|
||||||
admin: false,
|
admin: false,
|
||||||
allowPersonalOwnership,
|
allowPersonalOwnership,
|
||||||
originalCipher: cipher,
|
originalCipher: cipher,
|
||||||
|
|
Loading…
Reference in New Issue