]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
channel: allow access to removed channels for users with full rights
authorJaroslav Kysela <perex@perex.cz>
Mon, 11 Apr 2016 08:13:54 +0000 (10:13 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 11 Apr 2016 08:14:39 +0000 (10:14 +0200)
src/channels.c

index 972464b4c760c5d615bbaf8f193f62f479cdde73..1e475ec58e053a4380e240813d869df73e7d809c 100644 (file)
@@ -596,9 +596,16 @@ channel_access(channel_t *ch, access_t *a, int disabled)
 {
   char ubuf[UUID_HEX_SIZE];
 
-  if (!ch || !a)
+  if (!a)
     return 0;
 
+  if (!ch) {
+    /* If user has full rights, allow access to removed chanels */
+    if (a->aa_chrange == NULL && a->aa_chtags == NULL)
+      return 1;
+    return 0;
+  }
+
   if (!disabled && !ch->ch_enabled)
     return 0;