@truedat/core 4.48.2 → 4.48.5

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
  # Changelog
2
2
 
3
+ ## [4.48.3] 2022-07-11
4
+
5
+ ### Changed
6
+
7
+ - [TD-3614] Always include Bearer token if present in localStorage
8
+
3
9
  ## [4.48.2] 2022-07-08
4
10
 
5
11
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/core",
3
- "version": "4.48.2",
3
+ "version": "4.48.5",
4
4
  "description": "Truedat Web Core",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -112,5 +112,5 @@
112
112
  "react-dom": ">= 16.8.6 < 17",
113
113
  "semantic-ui-react": ">= 0.88.2 < 2.1"
114
114
  },
115
- "gitHead": "93133e957332713e64c97eecdf45cc283c29bd32"
115
+ "gitHead": "668fb37a5ca8a3ca4d3009d9b6d218a8bec75d66"
116
116
  }
@@ -113,4 +113,7 @@ export default {
113
113
  "sidemenu.taxonomy": "Taxonomy",
114
114
  "sidemenu.templates": "Templates",
115
115
  "sidemenu.users": "Users",
116
+ "view.unauthorized.content":
117
+ "If you want to update your permissions, please contact the administrator.",
118
+ "view.unauthorized.head": "You are not authorized to view this content",
116
119
  };
@@ -116,4 +116,8 @@ export default {
116
116
  "sidemenu.taxonomy": "Dominios",
117
117
  "sidemenu.templates": "Plantillas",
118
118
  "sidemenu.users": "Usuarios",
119
+ "view.unauthorized.head":
120
+ "No dispones de autorización para ver este contenido",
121
+ "view.unauthorized.content":
122
+ "Si quiere actualizar sus permisos, por favor contacte con el administrador.",
119
123
  };
@@ -4,16 +4,15 @@ import { readToken } from "./storage";
4
4
  axios.interceptors.request.use(
5
5
  function (config) {
6
6
  const token = readToken();
7
- if (token != null && !config.url.match(/\/sessions/)) {
8
- return {
9
- ...config,
10
- headers: {
11
- ...config.headers,
12
- Authorization: `Bearer ${token}`,
13
- },
14
- };
15
- }
16
- return config;
7
+ return token === null
8
+ ? config
9
+ : {
10
+ ...config,
11
+ headers: {
12
+ ...config.headers,
13
+ Authorization: `Bearer ${token}`,
14
+ },
15
+ };
17
16
  },
18
17
  function (err) {
19
18
  return Promise.reject(err);