Moriz Wahl 7315cacb5a Text for 403 error is localized
I hacked the error.vue to catch the default 404 error message and to display a localized message instead. I found no better way to do it. Any ideas?
2020-01-28 10:18:15 +01:00

6 lines
162 B
JavaScript

export default ({ store, error }) => {
if (!store.getters['auth/isAdmin']) {
return error({ statusCode: 403, message: 'error-pages.not-authorized' })
}
}