diff --git a/mock/user.js b/mock/user.js index 254fe4b..3594db2 100644 --- a/mock/user.js +++ b/mock/user.js @@ -5,15 +5,18 @@ const tokens = { }, editor: { token: 'editor-token' + }, + user: { + token: 'editor-token' } } const users = { 'admin-token': { roles: ['admin'], - introduction: 'I am a super administrator', + introduction: 'Projektmanager bei RedBull', avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif', - name: 'Super Admin' + name: 'Julia Krammer' }, 'editor-token': { roles: ['editor'], diff --git a/src/utils/validate.js b/src/utils/validate.js index 6b3ac41..6874011 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -15,7 +15,7 @@ export function isExternal(path) { * @returns {Boolean} */ export function validUsername(str) { - const valid_map = ['admin', 'editor'] + const valid_map = ['admin', 'editor', 'user'] return valid_map.indexOf(str.trim()) >= 0 } diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 5fb3f6e..58e746d 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,9 +1,15 @@