diff --git a/src/permission.js b/src/permission.js index bb0abce8..b7c82f5c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -37,7 +37,7 @@ export const beforeEachRoute = (to, from, next) => { dangerouslyUseHTMLString: true, message: err, type: 'error', - duration: 7 * 1000 + duration: 10 * 1000 }) next({ path: '/' }) }) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index c8d3c03a..861d4192 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -81,6 +81,9 @@ const user = { return new Promise((resolve, reject) => { getUserInfo(state.token, state.authHost).then(response => { const data = response.data + const message = 'This user doesn\`t have admin rights. Try another credentials or see the ' + + 'docs' + + ' to find out how to make this user an admin' if (!data) { reject('Verification failed, please login again.') @@ -89,9 +92,7 @@ const user = { if (data.pleroma && data.pleroma.is_admin) { commit('SET_ROLES', ['admin']) } else { - reject('This user doesn\`t have admin rights. Try another credentials or see ' + - 'docs' + - ' to find out how to make this user an admin') + reject(message) } commit('SET_NAME', data.username)