1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-27 04:03:00 +02:00

[Policy] Personal Ownership (#605)

* Initial commit of personal ownership

* Saving updated merge conflicts

* Updated jslib (dcbd09e -> 72bf18f)

* Fixed casing
This commit is contained in:
Vincent Salucci 2020-12-09 14:11:39 -06:00 committed by GitHub
parent 2bfba0be5c
commit 82ca93db91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 4 deletions

2
jslib

@ -1 +1 @@
Subproject commit dcbd09e736b516b359369f9d9fe5b0f5a6c2a928
Subproject commit 72bf18f369068d36767794bdc0ca377f734cf373

View File

@ -311,7 +311,7 @@
</div>
</div>
</div>
<div class="box" *ngIf="(!editMode || cloneMode) && ownershipOptions && ownershipOptions.length > 1">
<div class="box" *ngIf="allowOwnershipOptions()">
<div class="box-header">
{{'ownership' | i18n}}
</div>

View File

@ -13,6 +13,7 @@ import { FolderService } from 'jslib/abstractions/folder.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { MessagingService } from 'jslib/abstractions/messaging.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import { PolicyService } from 'jslib/abstractions/policy.service';
import { StateService } from 'jslib/abstractions/state.service';
import { UserService } from 'jslib/abstractions/user.service';
@ -32,9 +33,10 @@ export class AddEditComponent extends BaseAddEditComponent implements OnChanges,
auditService: AuditService, stateService: StateService,
userService: UserService, collectionService: CollectionService,
messagingService: MessagingService, eventService: EventService,
private broadcasterService: BroadcasterService, private ngZone: NgZone) {
policyService: PolicyService, private broadcasterService: BroadcasterService,
private ngZone: NgZone) {
super(cipherService, folderService, i18nService, platformUtilsService, auditService, stateService,
userService, collectionService, messagingService, eventService);
userService, collectionService, messagingService, eventService, policyService);
}
async ngOnInit() {
@ -77,4 +79,9 @@ export class AddEditComponent extends BaseAddEditComponent implements OnChanges,
});
}
}
allowOwnershipOptions(): boolean {
return (!this.editMode || this.cloneMode) && this.ownershipOptions
&& (this.ownershipOptions.length > 1 || !this.allowPersonal);
}
}

View File

@ -1455,5 +1455,8 @@
},
"verifyBrowserDescription": {
"message": "Please ensure the shown fingerprint is identical to the fingerprint showed in the browser extension."
},
"personalOwnershipSubmitError": {
"message": "Due to an Enterprise Policy, you are restricted from saving items to your personal vault. Change the Ownership option to an organization and choose from available Collections."
}
}