Merge branch '89-username-sidebar' into 'develop'

Fix #89: Always use username in sidebar

Closes #89

See merge request funkwhale/funkwhale!61
merge-requests/154/head
Eliot Berriot 2018-02-27 16:54:04 +00:00
commit 1e2ab3ee06
3 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -4,6 +4,8 @@ Changelog
0.6 (Unreleased)
----------------
- Always use username in sidebar (#89)
0.5.2 (2018-02-26)
------------------

Wyświetl plik

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

Wyświetl plik

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