From b5aba2cc812280358203dde2a50c4dcf366bdb2f Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Sun, 29 Mar 2020 22:21:09 +0300 Subject: [PATCH] Link to docs when a non-admin user tries to log in --- src/permission.js | 1 + src/store/modules/user.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/permission.js b/src/permission.js index 892f487f..bb0abce8 100644 --- a/src/permission.js +++ b/src/permission.js @@ -34,6 +34,7 @@ export const beforeEachRoute = (to, from, next) => { }).catch((err) => { store.dispatch('FedLogOut').then(() => { Message({ + dangerouslyUseHTMLString: true, message: err, type: 'error', duration: 7 * 1000 diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 762826c7..c8d3c03a 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -89,7 +89,9 @@ 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('This user doesn\`t have admin rights. Try another credentials or see ' + + 'docs' + + ' to find out how to make this user an admin') } commit('SET_NAME', data.username)