From: Jaroslav Kysela Date: Thu, 12 May 2016 19:02:22 +0000 (+0200) Subject: webui: add 'Conditional Access' field to the base config, fixes #3760 X-Git-Tag: v4.2.1~515 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba0eb9b08cd0461e9058dca5118d8cbf7565107e;p=thirdparty%2Ftvheadend.git webui: add 'Conditional Access' field to the base config, fixes #3760 --- diff --git a/src/config.c b/src/config.c index 975e33e0e..0dc4e4994 100644 --- a/src/config.c +++ b/src/config.c @@ -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", diff --git a/src/config.h b/src/config.h index c1c5afe21..2e135f353 100644 --- a/src/config.h +++ b/src/config.h @@ -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; diff --git a/src/main.c b/src/main.c index cb439f6ea..8aaa8d9e3 100644 --- a/src/main.c +++ b/src/main.c @@ -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; } diff --git a/src/webui/static/app/caclient.js b/src/webui/static/app/caclient.js index 2bbe2cbb3..83cc32b54 100644 --- a/src/webui/static/app/caclient.js +++ b/src/webui/static/app/caclient.js @@ -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: {