diff --git a/src/permission.js b/src/permission.js
index 892f487f..b7c82f5c 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -34,9 +34,10 @@ export const beforeEachRoute = (to, from, next) => {
}).catch((err) => {
store.dispatch('FedLogOut').then(() => {
Message({
+ 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 762826c7..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,7 +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 run `MIX_ENV=prod mix pleroma.user set NICKNAME --admin`')
+ reject(message)
}
commit('SET_NAME', data.username)