mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
Ps 976 moving of read only organization collection items to different folder not possible (#3474)
* PS-976 - when user has cipher readonly permissions, prevent user from editing cipher fields and make separate api call that only updates Favorite and Folder values * PS-976 - in the readonly edit cipher view, hide non-operable buttons and display select values as readonly input text * PS-976 - update failing test * PS-976 - split cipher saveWithServer call into Create and Update calls * PS-976 - replace property with function call to get the card expiration month for the readonly view * MM-976 - when user has readonly permissions hide "delete" button on View Item view, hide generate username/password buttons on Edit Item view * PS-976 - rename cipherPartialRequest file to align with new naming convention
This commit is contained in:
@@ -77,7 +77,7 @@ export class CreateCommand {
|
||||
private async createCipher(req: CipherExport) {
|
||||
const cipher = await this.cipherService.encrypt(CipherExport.toView(req));
|
||||
try {
|
||||
await this.cipherService.saveWithServer(cipher);
|
||||
await this.cipherService.createWithServer(cipher);
|
||||
const newCipher = await this.cipherService.get(cipher.id);
|
||||
const decCipher = await newCipher.decrypt();
|
||||
const res = new CipherResponse(decCipher);
|
||||
|
||||
@@ -84,7 +84,7 @@ export class EditCommand {
|
||||
cipherView = CipherExport.toView(req, cipherView);
|
||||
const encCipher = await this.cipherService.encrypt(cipherView);
|
||||
try {
|
||||
await this.cipherService.saveWithServer(encCipher);
|
||||
await this.cipherService.updateWithServer(encCipher);
|
||||
const updatedCipher = await this.cipherService.get(cipher.id);
|
||||
const decCipher = await updatedCipher.decrypt();
|
||||
const res = new CipherResponse(decCipher);
|
||||
|
||||
Reference in New Issue
Block a user