Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
dashboard
Commits
3af06e50
Commit
3af06e50
authored
Aug 25, 2020
by
Richard Blechinger
Browse files
Fix a bug where refreshing on any page other than Home would fail to load data
parent
736db302
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/App.vue
View file @
3af06e50
...
...
@@ -54,7 +54,8 @@ export default {
}
}
},
mounted
()
{
created
()
{
console
.
log
(
"
auth::init
"
);
this
.
$store
.
dispatch
(
'
auth/oidcInit
'
)
},
methods
:
{
...
...
src/components/ShowManager.vue
View file @
3af06e50
...
...
@@ -90,20 +90,25 @@ export default {
// Right after this component is set up, we want to fetch all available shows
// and the arrays for the show meta info from the AuRa steering module.
created
()
{
this
.
$store
.
dispatch
(
'
shows/fetchShows
'
,
{
callback
:
()
=>
{
this
.
$store
.
dispatch
(
'
playlists/fetch
'
,
{
slug
:
this
.
selectedShow
.
slug
})
this
.
$refs
.
showSelector
.
updateInputSelector
()
this
.
$store
.
watch
(
(
state
)
=>
state
.
auth
.
user
.
steeringUser
,
()
=>
{
this
.
$store
.
dispatch
(
'
shows/fetchShows
'
,
{
callback
:
()
=>
{
this
.
$store
.
dispatch
(
'
playlists/fetch
'
,
{
slug
:
this
.
selectedShow
.
slug
})
this
.
$refs
.
showSelector
.
updateInputSelector
()
}
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
types
'
,
onlyActive
:
true
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
fundingcategories
'
,
onlyActive
:
true
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
categories
'
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
topics
'
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
musicfocus
'
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
languages
'
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
hosts
'
})
if
(
this
.
isSuperuser
)
{
this
.
$store
.
dispatch
(
'
auth/fetchUsers
'
)
}
}
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
types
'
,
onlyActive
:
true
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
fundingcategories
'
,
onlyActive
:
true
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
categories
'
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
topics
'
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
musicfocus
'
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
languages
'
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
hosts
'
})
if
(
this
.
isSuperuser
)
{
this
.
$store
.
dispatch
(
'
auth/fetchUsers
'
)
}
);
},
methods
:
{
...
...
src/components/ShowSelector.vue
View file @
3af06e50
...
...
@@ -98,7 +98,10 @@ export default {
},
computed
:
{
isSuperuser
()
{
return
this
.
$store
.
state
.
auth
.
user
.
steeringUser
.
is_superuser
},
isSuperuser
()
{
const
user
=
this
.
$store
.
state
.
auth
.
user
.
steeringUser
;
return
user
&&
user
.
is_superuser
;
},
loaded
()
{
return
{
shows
:
this
.
$store
.
state
.
shows
.
loaded
.
shows
,
...
...
src/store/modules/auth.js
View file @
3af06e50
...
...
@@ -186,7 +186,6 @@ const actions = {
this
.
$log
.
debug
(
err
)
alert
(
'
Error: could not fetch OIDC user object. See console for details.
'
)
})
},
signinRedirect
()
{
...
...
src/store/modules/shows.js
View file @
3af06e50
...
...
@@ -154,10 +154,11 @@ const mutations = {
const
actions
=
{
fetchShows
(
ctx
,
data
)
{
const
user
=
ctx
.
rootState
.
auth
.
user
.
steeringUser
;
ctx
.
commit
(
'
loading
'
,
'
shows
'
)
let
uri
=
process
.
env
.
VUE_APP_API_STEERING
+
'
shows
'
// normal users should only see their own shows, only superusers see all shows
if
(
!
ctx
.
rootState
.
auth
.
user
.
steeringU
ser
.
is_superuser
)
{
if
(
user
&&
!
u
ser
.
is_superuser
)
{
uri
+=
'
?owner=
'
+
ctx
.
rootState
.
auth
.
user
.
steeringUser
.
id
}
axios
.
get
(
uri
,
{
...
...
Andrea Ida Malkah Klaura
@jackie
mentioned in commit
a63f9c73
·
Aug 26, 2020
mentioned in commit
a63f9c73
mentioned in commit a63f9c73b31642e49c328aee7433e63f6fb97860
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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