WEBUI: Do not show the access state if --noacl is active
This commit is contained in:
parent
242496e163
commit
a77b65a8af
3 changed files with 7 additions and 5 deletions
|
@ -46,7 +46,7 @@ struct access_ticket_queue access_tickets;
|
|||
const char *superuser_username;
|
||||
const char *superuser_password;
|
||||
|
||||
static int access_noacl;
|
||||
int access_noacl;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -138,12 +138,15 @@ comet_mailbox_create(void)
|
|||
static void
|
||||
comet_access_update(http_connection_t *hc, comet_mailbox_t *cmb)
|
||||
{
|
||||
extern int access_noacl;
|
||||
|
||||
htsmsg_t *m = htsmsg_create_map();
|
||||
const char *username = hc->hc_access ? (hc->hc_access->aa_username ?: "") : "";
|
||||
|
||||
htsmsg_add_str(m, "notificationClass", "accessUpdate");
|
||||
|
||||
htsmsg_add_str(m, "username", username);
|
||||
if (!access_noacl)
|
||||
htsmsg_add_str(m, "username", username);
|
||||
htsmsg_add_u32(m, "dvr", !http_access_verify(hc, ACCESS_RECORDER));
|
||||
htsmsg_add_u32(m, "admin", !http_access_verify(hc, ACCESS_ADMIN));
|
||||
|
||||
|
|
|
@ -311,7 +311,8 @@ function accessUpdate(o) {
|
|||
if (!tvheadend.capabilities)
|
||||
return;
|
||||
|
||||
tvheadend.rootTabPanel.setLogin(o.username);
|
||||
if ('username' in o)
|
||||
tvheadend.rootTabPanel.setLogin(o.username);
|
||||
|
||||
if (tvheadend.autorecButton)
|
||||
tvheadend.autorecButton.setDisabled(o.dvr != true);
|
||||
|
@ -514,8 +515,6 @@ tvheadend.RootTabPanel = Ext.extend(Ext.TabPanel, {
|
|||
if (p == this.loginItem || p == this.loginCmdItem)
|
||||
return false;
|
||||
});
|
||||
|
||||
this.setLogin('');
|
||||
},
|
||||
|
||||
getComponent: function(comp) {
|
||||
|
|
Loading…
Add table
Reference in a new issue