mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
throw error if trying to edit cipher with collection ids
This commit is contained in:
@@ -451,6 +451,9 @@ export class CipherService implements CipherServiceAbstraction {
|
|||||||
}
|
}
|
||||||
cipher.id = response.id;
|
cipher.id = response.id;
|
||||||
} else {
|
} else {
|
||||||
|
if (collectionIds != null) {
|
||||||
|
throw new Error('You cannot edit with collection ids.');
|
||||||
|
}
|
||||||
const request = new CipherRequest(cipher);
|
const request = new CipherRequest(cipher);
|
||||||
response = await this.apiService.putCipher(cipher.id, request);
|
response = await this.apiService.putCipher(cipher.id, request);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user