1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

set org id when encrypting new

This commit is contained in:
Kyle Spearrin
2018-07-05 10:10:30 -04:00
parent f089b5e3d1
commit fda8155894
3 changed files with 9 additions and 2 deletions

2
jslib

Submodule jslib updated: 9b008ff382...ef5eebba66

View File

@@ -50,6 +50,13 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit {
}
}
protected encryptCipher() {
if (!this.editMode) {
this.cipher.organizationId = this.organization.id;
}
return super.encryptCipher();
}
protected async saveCipher(cipher: Cipher) {
if (this.organization.isAdmin) {
const request = new CipherRequest(cipher);

View File

@@ -10,7 +10,7 @@
</td>
<td (click)="checkCipher(c)">
<a href="#" appStopClick appStopProp (click)="selectCipher(c)" title="{{'editItem' | i18n}}">{{c.name}}</a>
<i class="fa fa-share-alt" appStopProp *ngIf="c.organizationId" title="{{'shared' | i18n}}"></i>
<i class="fa fa-share-alt" appStopProp *ngIf="!organization && c.organizationId" title="{{'shared' | i18n}}"></i>
<i class="fa fa-paperclip" appStopProp *ngIf="c.hasAttachments" title="{{'attachments' | i18n}}"></i>
<br>
<small appStopProp>{{c.subTitle}}</small>