Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
webui: add 'Conditional Access' field to the base config, fixes #3760
  • Loading branch information
perexg committed May 12, 2016
1 parent f4cce41 commit ba0eb9b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/config.c
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/config.h
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/main.c
Expand Up @@ -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;
}

Expand Down
3 changes: 2 additions & 1 deletion src/webui/static/app/caclient.js
Expand Up @@ -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: {
Expand Down

0 comments on commit ba0eb9b

Please sign in to comment.