@atlaskit/smart-card 18.0.16 → 18.0.17

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 18.0.17
4
+
5
+ ### Patch Changes
6
+
7
+ - [`79b365c3757`](https://bitbucket.org/atlassian/atlassian-frontend/commits/79b365c3757) - [ux] If the "authFlow: disabled" prop is provided on the Smart Card Provider, then the call to action to authenticate forbidden links will also be disabled (in addition to the existing behaviour where only unauthenticated links have the call to action disabled).
8
+
3
9
  ## 18.0.16
4
10
 
5
11
  ### Patch Changes
@@ -98,7 +98,7 @@ var useSmartCardActions = function useSmartCardActions(id, url, analytics) {
98
98
  var nextStatus = response ? (0, _helpers2.getStatus)(response) : 'fatal'; // If we require authorization & do not have an authFlow available,
99
99
  // throw an error and render as a normal blue link.
100
100
 
101
- if (nextStatus === 'unauthorized' && !hasAuthFlowSupported) {
101
+ if ((nextStatus === 'unauthorized' || nextStatus === 'forbidden') && !hasAuthFlowSupported) {
102
102
  handleResolvedLinkError(resourceUrl, new _errors.APIError('fallback', hostname, _constants.ERROR_MESSAGE_OAUTH));
103
103
  return;
104
104
  } // Handle any other errors
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "18.0.16",
3
+ "version": "18.0.17",
4
4
  "sideEffects": false
5
5
  }
@@ -70,7 +70,7 @@ export const useSmartCardActions = (id, url, analytics) => {
70
70
  const nextStatus = response ? getStatus(response) : 'fatal'; // If we require authorization & do not have an authFlow available,
71
71
  // throw an error and render as a normal blue link.
72
72
 
73
- if (nextStatus === 'unauthorized' && !hasAuthFlowSupported) {
73
+ if ((nextStatus === 'unauthorized' || nextStatus === 'forbidden') && !hasAuthFlowSupported) {
74
74
  handleResolvedLinkError(resourceUrl, new APIError('fallback', hostname, ERROR_MESSAGE_OAUTH));
75
75
  return;
76
76
  } // Handle any other errors
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "18.0.16",
3
+ "version": "18.0.17",
4
4
  "sideEffects": false
5
5
  }
@@ -71,7 +71,7 @@ export var useSmartCardActions = function useSmartCardActions(id, url, analytics
71
71
  var nextStatus = response ? getStatus(response) : 'fatal'; // If we require authorization & do not have an authFlow available,
72
72
  // throw an error and render as a normal blue link.
73
73
 
74
- if (nextStatus === 'unauthorized' && !hasAuthFlowSupported) {
74
+ if ((nextStatus === 'unauthorized' || nextStatus === 'forbidden') && !hasAuthFlowSupported) {
75
75
  handleResolvedLinkError(resourceUrl, new APIError('fallback', hostname, ERROR_MESSAGE_OAUTH));
76
76
  return;
77
77
  } // Handle any other errors
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "18.0.16",
3
+ "version": "18.0.17",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "18.0.16",
3
+ "version": "18.0.17",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"