mirror of
https://github.com/bitwarden/web
synced 2026-01-02 08:33:18 +00:00
Refactor orgnaization policy management (#1147)
This commit is contained in:
13
src/app/services/policy-list.service.ts
Normal file
13
src/app/services/policy-list.service.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { BasePolicy } from '../organizations/policies/base-policy.component';
|
||||
|
||||
export class PolicyListService {
|
||||
private policies: BasePolicy[] = [];
|
||||
|
||||
addPolicies(policies: BasePolicy[]) {
|
||||
this.policies.push(...policies);
|
||||
}
|
||||
|
||||
getPolicies(): BasePolicy[] {
|
||||
return this.policies;
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import { WebPlatformUtilsService } from '../../services/webPlatformUtils.service
|
||||
import { EventService } from './event.service';
|
||||
import { OrganizationGuardService } from './organization-guard.service';
|
||||
import { OrganizationTypeGuardService } from './organization-type-guard.service';
|
||||
import { PolicyListService } from './policy-list.service';
|
||||
import { RouterService } from './router.service';
|
||||
|
||||
import { AuthGuardService } from 'jslib-angular/services/auth-guard.service';
|
||||
@@ -191,6 +192,7 @@ export function initFactory(): Function {
|
||||
RouterService,
|
||||
EventService,
|
||||
LockGuardService,
|
||||
PolicyListService,
|
||||
{ provide: AuditServiceAbstraction, useValue: auditService },
|
||||
{ provide: AuthServiceAbstraction, useValue: authService },
|
||||
{ provide: CipherServiceAbstraction, useValue: cipherService },
|
||||
|
||||
Reference in New Issue
Block a user