mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-03 09:44:41 +02:00
Fix:Restrict podcast search page to admins
This commit is contained in:
parent
cf32819c01
commit
8966dbbcd1
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue