Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[htsp] pass access rights to clients
  • Loading branch information
Glenn-1990 authored and perexg committed Nov 28, 2016
1 parent d233fae commit d6488b3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/htsp_server.c
Expand Up @@ -1301,6 +1301,18 @@ htsp_method_authenticate(htsp_connection_t *htsp, htsmsg_t *in)

if(!(htsp->htsp_granted_access->aa_rights & HTSP_PRIV_MASK))
htsmsg_add_u32(r, "noaccess", 1);
else if (htsp->htsp_version > 25) {
htsmsg_add_u32(r, "admin", htsp->htsp_granted_access->aa_rights & ACCESS_ADMIN ? 1 : 0);
htsmsg_add_u32(r, "streaming", htsp->htsp_granted_access->aa_rights & ACCESS_HTSP_STREAMING ? 1 : 0);
htsmsg_add_u32(r, "dvr", htsp->htsp_granted_access->aa_rights & ACCESS_HTSP_RECORDER ? 1 : 0);
htsmsg_add_u32(r, "anonymous", htsp->htsp_granted_access->aa_rights & ACCESS_HTSP_ANONYMIZE ? 1 : 0);
htsmsg_add_u32(r, "limitall", htsp->htsp_granted_access->aa_conn_limit);
htsmsg_add_u32(r, "limitdvr", htsp->htsp_granted_access->aa_conn_limit_dvr);
htsmsg_add_u32(r, "limitstreaming", htsp->htsp_granted_access->aa_conn_limit_streaming);
htsmsg_add_u32(r, "uilevel", htsp->htsp_granted_access->aa_uilevel == UILEVEL_DEFAULT ?
config.uilevel : htsp->htsp_granted_access->aa_uilevel);
htsmsg_add_str(r, "uilanguage", htsp->htsp_granted_access->aa_lang_ui);
}

return r;
}
Expand Down

0 comments on commit d6488b3

Please sign in to comment.