1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-02 13:23:29 +01:00
bitwarden-browser/libs/angular/src/guard
Shane Melton c6be3fa19c
[AC-1437] Introduce Feature Flag route guard (#5465)
* Add feature flag route guard and tests

* Add additional test for not showing error toast

* Strengthen error toast test with message check

* Cleanup leaking test state in platformService mock

* Negate if statement to reduce nesting

* Update return type to CanActivateFn

* Use null check instead of undefined

* Introduce interface to support different feature flag types

- Switch to observable pattern to access serverConfig$ subject
- Add catchError handler to allow navigation in case of unexpected exception
- Add additional tests

* Add additional test for missing feature flag

* Remove subscription to the serverConfig observable

Introduce type checking logic to determine the appropriately typed flag getter to use in configService

* Update the feature flag to fallback to blocking the route on an unexpected exception

* Trigger test action

* Fix imports after merge with master
2023-06-08 09:12:52 -07:00
..
feature-flag.guard.spec.ts [AC-1437] Introduce Feature Flag route guard (#5465) 2023-06-08 09:12:52 -07:00
feature-flag.guard.ts [AC-1437] Introduce Feature Flag route guard (#5465) 2023-06-08 09:12:52 -07:00