mirror of
https://github.com/bitwarden/browser
synced 2026-02-05 03:03:26 +00:00
[PM-27291] Preserve organizationId in critical app mark/unmark updates
Update removeCriticalApplication$ and saveCriticalApplications$ to preserve organizationId from the current report state when emitting mark/unmark updates. This ensures critical app flag updates maintain the organization context, allowing the scan operator to correctly identify them as same-org updates (which should preserve data) rather than org changes (which should clear data). Without this, mark/unmark updates would emit without organizationId, causing the scan operator to incorrectly treat them as new org states.
This commit is contained in:
@@ -240,7 +240,10 @@ export class RiskInsightsOrchestratorService {
|
||||
.pipe(
|
||||
map(() => updatedState),
|
||||
tap((finalState) => {
|
||||
this._markUnmarkUpdatesSubject.next(finalState);
|
||||
this._markUnmarkUpdatesSubject.next({
|
||||
...finalState,
|
||||
organizationId: reportState.organizationId,
|
||||
});
|
||||
}),
|
||||
catchError((error: unknown) => {
|
||||
this.logService.error("Failed to save updated applicationData", error);
|
||||
@@ -324,7 +327,10 @@ export class RiskInsightsOrchestratorService {
|
||||
.pipe(
|
||||
map(() => updatedState),
|
||||
tap((finalState) => {
|
||||
this._markUnmarkUpdatesSubject.next(finalState);
|
||||
this._markUnmarkUpdatesSubject.next({
|
||||
...finalState,
|
||||
organizationId: reportState.organizationId,
|
||||
});
|
||||
}),
|
||||
catchError((error: unknown) => {
|
||||
this.logService.error("Failed to save updated applicationData", error);
|
||||
|
||||
Reference in New Issue
Block a user