Verified Commit fbb256bc authored by Agate's avatar Agate 💬

Fix #89: Always use username in sidebar

parent ca30b5ef
Pipeline #458 passed with stage
in 2 minutes and 5 seconds
......@@ -4,6 +4,8 @@ Changelog
0.6 (Unreleased)
----------------
- Always use username in sidebar (#89)
0.5.2 (2018-02-26)
------------------
......
......@@ -89,6 +89,7 @@ export default {
logger.default.info('Successfully fetched user profile')
let data = response.data
commit('profile', data)
commit('username', data.username)
dispatch('favorites/fetch', null, {root: true})
Object.keys(data.permissions).forEach(function (key) {
// this makes it easier to check for permissions in templates
......
......@@ -176,6 +176,7 @@ describe('store/auth', () => {
action: store.actions.fetchProfile,
expectedMutations: [
{ type: 'profile', payload: profile },
{ type: 'username', payload: profile.username },
{ type: 'permission', payload: {key: 'admin', status: true} }
],
expectedActions: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment