qpp-style 9.12.2 → 9.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qpp-style",
3
- "version": "9.12.2",
3
+ "version": "9.13.0",
4
4
  "description": "Shared style guide across the QPP program.",
5
5
  "main": "dist/index.js",
6
6
  "homepage": "https://cmsgov.github.io/qpp-style",
package/session/logout.js CHANGED
@@ -3,25 +3,31 @@ import axios from 'axios';
3
3
 
4
4
  export const deleteImpersonatedUser = (cookies) => {
5
5
  const userHasApmPayments = localStorage.getItem('user_has_apm_payments');
6
- if (
7
- cookies.hasOwnProperty('qpp_impersonated_user', 'user_has_apm_payments')
8
- ) {
9
- document.cookie = `user_has_apm_payments=${userHasApmPayments}; Path=/;`;
6
+ if (cookies.hasOwnProperty('qpp_impersonated_user')) {
10
7
  document.cookie =
11
8
  'qpp_impersonated_user=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
12
9
  }
10
+
11
+ if (cookies.hasOwnProperty('qpp_impersonated_type')) {
12
+ document.cookie =
13
+ 'qpp_impersonated_type=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
14
+ }
15
+
16
+ if (cookies.hasOwnProperty('user_has_apm_payments')) {
17
+ document.cookie = `user_has_apm_payments=${userHasApmPayments}; Path=/;`;
18
+ }
13
19
  };
14
20
 
15
21
  export const revertQppHasAuthsCookie = () => {
16
22
  const { qppHasAuthorizations, behindSSL } = JSON.parse(
17
23
  localStorage.getItem('impersonatorAuthValues')
18
- )
24
+ );
19
25
  if (qppHasAuthorizations) {
20
26
  document.cookie = `qpp_has_authorizations=${qppHasAuthorizations};path=/${
21
27
  behindSSL ? ';secure' : ''
22
- }`
28
+ }`;
23
29
  }
24
- }
30
+ };
25
31
 
26
32
  /**
27
33
  * Makes an API request to end the user session.