]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui: add 'Conditional Access' field to the base config, fixes #3760
authorJaroslav Kysela <perex@perex.cz>
Thu, 12 May 2016 19:02:22 +0000 (21:02 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 12 May 2016 19:02:22 +0000 (21:02 +0200)
src/config.c
src/config.h
src/main.c
src/webui/static/app/caclient.js

index 975e33e0ebe8caa3abac42bf45c36d1f3dd6f4ff..0dc4e4994fbcaa44b3bee4100ced73aa208c8b82 100644 (file)
@@ -2121,6 +2121,16 @@ const idclass_t config_class = {
       .opts   = PO_EXPERT,
       .group  = 1
     },
+    {
+      .type   = PT_BOOL,
+      .id     = "caclient_ui",
+      .name   = N_("Conditional Access"),
+      .desc   = N_("Enable the CAs (conditional accesses) tab in web user interface "
+                   "for the advanced level. By default, this tab is visible only "
+                   "in the expert level."),
+      .off    = offsetof(config_t, caclient_ui),
+      .group  = 1
+    },
     {
       .type   = PT_U32,
       .id     = "descrambler_buffer",
index c1c5afe210b550600e2c54363dc382b596cb2be5..2e135f353a565b826db9369a7617a912c268dcba 100644 (file)
@@ -55,6 +55,7 @@ typedef struct config {
   uint32_t cookie_expires;
   int dscp;
   uint32_t descrambler_buffer;
+  int caclient_ui;
   int parser_backlog;
   int epg_compress;
 } config_t;
index cb439f6eab263c68b8372e90038c9e5a9a5461ca..8aaa8d9e3a01b08b3f1931e26fc253bafcaa9abd 100644 (file)
@@ -1414,6 +1414,8 @@ htsmsg_t *tvheadend_capabilities_list(int check)
       htsmsg_add_str(r, NULL, tc->name);
     tc++;
   }
+  if (config.caclient_ui)
+    htsmsg_add_str(r, NULL, "caclient_advanced");
   return r;
 }
 
index 2bbe2cbb31bf781daa3874577fad6f84be15cf90..83cc32b54d2fd9406e3d9b8012ac111bbd9d96aa 100644 (file)
@@ -37,7 +37,8 @@ tvheadend.caclient = function(panel, index) {
         val: 'title',
         fields: ['uuid', 'title', 'status'],
         tabIndex: index,
-        uilevel: 'expert',
+        uilevel: tvheadend.capabilities.indexOf('caclient_advanced') === -1
+                 ? 'expert' : 'advanced',
         list: { url: 'api/caclient/list', params: { } },
         edit: { params: { list: list } },
         add: {