Link to docs when a non-admin user tries to log in

This commit is contained in:
Angelina Filippova 2020-03-29 22:21:09 +03:00
parent 0ac84426f7
commit b5aba2cc81
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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('<span>This user doesn\`t have admin rights. Try another credentials or see </span>' +
'<u><a target="_blank" href="https://docs.pleroma.social/backend/administration/CLI_tasks/user/#set-the-value-of-the-given-users-settings">docs</a></u>' +
'<span> to find out how to make this user an admin</span>')
}
commit('SET_NAME', data.username)