Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
funkwhale
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Julien Veyssier
funkwhale
Commits
9f18b950
Verified
Commit
9f18b950
authored
Jun 10, 2018
by
Agate
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #245: admin menu not showing after login
parent
4c81de92
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
6 deletions
+9
-6
changes/changelog.d/245.bugfix
changes/changelog.d/245.bugfix
+1
-0
front/src/components/Sidebar.vue
front/src/components/Sidebar.vue
+1
-1
front/src/components/auth/Login.vue
front/src/components/auth/Login.vue
+0
-2
front/src/store/auth.js
front/src/store/auth.js
+7
-3
No files found.
changes/changelog.d/245.bugfix
0 → 100644
View file @
9f18b950
Fixed admin menu not showing after login (#245)
front/src/components/Sidebar.vue
View file @
9f18b950
...
...
@@ -272,7 +272,7 @@ export default {
this
.
scrollToCurrent
()
}
}
,
'
$store.state.availablePermissions
'
:
{
'
$store.state.a
uth.a
vailablePermissions
'
:
{
handler
()
{
this
.
fetchNotificationsCount
()
}
,
...
...
front/src/components/auth/Login.vue
View file @
9f18b950
...
...
@@ -79,8 +79,6 @@ export default {
username
:
this
.
credentials
.
username
,
password
:
this
.
credentials
.
password
}
// We need to pass the component's this context
// to properly make use of http in the auth service
this
.
$store
.
dispatch
(
'
auth/login
'
,
{
credentials
,
next
:
'
/library
'
,
...
...
front/src/store/auth.js
View file @
9f18b950
...
...
@@ -25,7 +25,11 @@ export default {
state
.
username
=
''
state
.
token
=
''
state
.
tokenData
=
{}
state
.
availablePermissions
=
{}
state
.
availablePermissions
=
{
federation
:
false
,
library
:
false
,
upload
:
false
}
},
profile
:
(
state
,
value
)
=>
{
state
.
profile
=
value
...
...
@@ -108,8 +112,8 @@ export default {
commit
(
'
authenticated
'
,
true
)
commit
(
'
profile
'
,
data
)
commit
(
'
username
'
,
data
.
username
)
dispatch
(
'
favorites/fetch
'
,
null
,
{
root
:
true
})
dispatch
(
'
playlists/fetchOwn
'
,
null
,
{
root
:
true
})
dispatch
(
'
favorites/fetch
'
,
null
,
{
root
:
true
})
dispatch
(
'
playlists/fetchOwn
'
,
null
,
{
root
:
true
})
Object
.
keys
(
data
.
permissions
).
forEach
(
function
(
key
)
{
// this makes it easier to check for permissions in templates
commit
(
'
permission
'
,
{
key
,
status
:
data
.
permissions
[
String
(
key
)]})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment