mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-04-02 01:16:54 +02:00
Fix:Restrict podcast search page to admins
This commit is contained in:
parent
cf32819c01
commit
8966dbbcd1
@ -45,6 +45,11 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
async asyncData({ params, query, store, app, redirect }) {
|
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 libraryId = params.library
|
||||||
var libraryData = await store.dispatch('libraries/fetch', libraryId)
|
var libraryData = await store.dispatch('libraries/fetch', libraryId)
|
||||||
if (!libraryData) {
|
if (!libraryData) {
|
||||||
|
Loading…
Reference in New Issue
Block a user