mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
PM-238 Master Reprompt Enabled Appears on Item in Organization (#5858)
* add-edit components and cipher service updated for organization item saveCiphers * update cipher service spec file
This commit is contained in:
@@ -20,8 +20,6 @@ import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folde
|
||||
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
||||
import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data";
|
||||
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
||||
import { CipherCreateRequest } from "@bitwarden/common/vault/models/request/cipher-create.request";
|
||||
import { CipherRequest } from "@bitwarden/common/vault/models/request/cipher.request";
|
||||
|
||||
import { AddEditComponent as BaseAddEditComponent } from "../individual-vault/add-edit.component";
|
||||
|
||||
@@ -115,19 +113,6 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
return this.cipherService.encrypt(this.cipher, null, this.originalCipher);
|
||||
}
|
||||
|
||||
protected async saveCipher(cipher: Cipher) {
|
||||
if (!this.organization.canEditAnyCollection || cipher.organizationId == null) {
|
||||
return super.saveCipher(cipher);
|
||||
}
|
||||
if (this.editMode && !this.cloneMode) {
|
||||
const request = new CipherRequest(cipher);
|
||||
return this.apiService.putCipherAdmin(this.cipherId, request);
|
||||
} else {
|
||||
const request = new CipherCreateRequest(cipher);
|
||||
return this.apiService.postCipherAdmin(request);
|
||||
}
|
||||
}
|
||||
|
||||
protected async deleteCipher() {
|
||||
if (!this.organization.canEditAnyCollection) {
|
||||
return super.deleteCipher();
|
||||
|
||||
Reference in New Issue
Block a user