@mapomodule/core
Advanced tools
Comparing version 1.0.0-alpha.16 to 1.0.0-alpha.17
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.0.0-alpha.17](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.16...v1.0.0-alpha.17) (2022-04-03) | ||
### Bug Fixes | ||
* various fixes to auth loops ([58cdb58](https://github.com/lotrekagency/mapo/commit/58cdb586e88df8e595876ba4dd4d4cc11865f7e3)) | ||
# [1.0.0-alpha.16](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.15...v1.0.0-alpha.16) (2022-04-03) | ||
@@ -8,0 +19,0 @@ |
@@ -22,5 +22,5 @@ module.exports = ({ $axios, store }) => { | ||
$axios.onError((error) => { | ||
const { status } = error.response || {} | ||
if (status === 401) { | ||
store.dispatch('mapo/user/logout'); | ||
const { status, request } = error.response || {} | ||
if (status === 401 && request?.path !== '/api/auth/logout') { | ||
store.dispatch('mapo/user/logout') | ||
} | ||
@@ -27,0 +27,0 @@ if (status == 403) { |
@@ -12,3 +12,3 @@ import Middleware from '../../middleware' // little hack to inject middleware in root project :P | ||
const { model } = route.meta.permissions | ||
const userPermission = userInfo.user_permissions.filter(perm => perm.codename.endsWith(model)).map(({ codename }) => codename.replace(`_${model}`, '')) | ||
const userPermission = (userInfo.user_permissions || []).filter(perm => perm.codename.endsWith(model)).map(({ codename }) => codename.replace(`_${model}`, '')) | ||
if (!userPermission.includes('view')) { | ||
@@ -15,0 +15,0 @@ return error({ statusCode: 404, message: 'This page could not be found' }) |
{ | ||
"name": "@mapomodule/core", | ||
"version": "1.0.0-alpha.16", | ||
"version": "1.0.0-alpha.17", | ||
"description": "This is part of Mapo nuxt module. Injects the core mapo plugin helpers.", | ||
@@ -21,3 +21,3 @@ "author": "bnznamco <gabriele.baldi.01@gmail.com>", | ||
}, | ||
"gitHead": "2ef4275464cd8eb28cbbc61c980355b1379186b5" | ||
"gitHead": "abd0d72a2d294acfde87af3a6f3fa3c19f100b30" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24381