mirror of
https://github.com/bitwarden/web
synced 2026-01-06 02:24:02 +00:00
[Policy] Personal Ownership (#722)
* Initial commit of personal ownership policy * Added event handling for modifying policies * I didn't save the merge conflict fix... * Removed unused import * Updated jslib (dcbd09e -> 2d62e10)
This commit is contained in:
@@ -12,6 +12,7 @@ import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
import { MessagingService } from 'jslib/abstractions/messaging.service';
|
||||
import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service';
|
||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||
import { PolicyService } from 'jslib/abstractions/policy.service';
|
||||
import { StateService } from 'jslib/abstractions/state.service';
|
||||
import { TotpService } from 'jslib/abstractions/totp.service';
|
||||
import { UserService } from 'jslib/abstractions/user.service';
|
||||
@@ -41,9 +42,10 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
auditService: AuditService, stateService: StateService,
|
||||
userService: UserService, collectionService: CollectionService,
|
||||
protected totpService: TotpService, protected passwordGenerationService: PasswordGenerationService,
|
||||
protected messagingService: MessagingService, eventService: EventService) {
|
||||
protected messagingService: MessagingService, eventService: EventService,
|
||||
protected policyService: PolicyService) {
|
||||
super(cipherService, folderService, i18nService, platformUtilsService, auditService, stateService,
|
||||
userService, collectionService, messagingService, eventService);
|
||||
userService, collectionService, messagingService, eventService, policyService);
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
@@ -155,7 +157,8 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
}
|
||||
|
||||
protected allowOwnershipAssignment() {
|
||||
return (!this.editMode || this.cloneMode) && this.ownershipOptions != null && this.ownershipOptions.length > 1;
|
||||
return (!this.editMode || this.cloneMode) && this.ownershipOptions != null
|
||||
&& (this.ownershipOptions.length > 1 || !this.allowPersonal);
|
||||
}
|
||||
|
||||
private async totpTick(intervalSeconds: number) {
|
||||
|
||||
Reference in New Issue
Block a user