Fix:Restrict podcast search page to admins

This commit is contained in:
advplyr 2023-12-17 11:06:03 -06:00
parent cf32819c01
commit 8966dbbcd1

View File

@ -45,6 +45,11 @@
<script>
export default {
async asyncData({ params, query, store, app, redirect }) {
// Podcast search/add page is restricted to admins
if (!store.getters['user/getIsAdminOrUp']) {
return redirect(`/library/${params.library}`)
}
var libraryId = params.library
var libraryData = await store.dispatch('libraries/fetch', libraryId)
if (!libraryData) {