mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-03 00:06:46 +01:00
Fix:Restrict podcast search page to admins
This commit is contained in:
parent
cf32819c01
commit
8966dbbcd1
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user