/* Send all DVR entries */
LIST_FOREACH(de, &dvrentries, de_global_link)
- if (!dvr_entry_verify(de, htsp->htsp_granted_access, 1) &&
- htsp_user_access_channel(htsp, de->de_channel))
+ if (!dvr_entry_verify(de, htsp->htsp_granted_access, 1))
htsp_send_message(htsp, htsp_build_dvrentry(htsp, de, "dvrEntryAdd", htsp->htsp_language), NULL);
/* Send EPG updates */
* Find DVR entry
*/
static dvr_entry_t *
-htsp_findDvrEntry(htsp_connection_t *htsp, htsmsg_t *in, htsmsg_t **out, int chn)
+htsp_findDvrEntry(htsp_connection_t *htsp, htsmsg_t *in, htsmsg_t **out, int readonly)
{
uint32_t dvrEntryId;
dvr_entry_t *de;
return NULL;
}
- if(dvr_entry_verify(de, htsp->htsp_granted_access, 1)) {
- *out = htsp_error(htsp, N_("User does not have access"));
- return NULL;
- }
-
- /* Check access */
- if (chn && de->de_channel && !htsp_user_access_channel(htsp, de->de_channel)) {
+ if(dvr_entry_verify(de, htsp->htsp_granted_access, readonly)) {
*out = htsp_error(htsp, N_("User does not have access"));
return NULL;
}
htsmsg_t *out = NULL;
dvr_entry_t *de;
- de = htsp_findDvrEntry(htsp, in, &out, 1);
+ de = htsp_findDvrEntry(htsp, in, &out, 0);
if (de == NULL)
return out;
htsmsg_t *out = NULL;
dvr_entry_t *de;
- de = htsp_findDvrEntry(htsp, in, &out, 1);
+ de = htsp_findDvrEntry(htsp, in, &out, 0);
if (de == NULL)
return out;
htsmsg_t *out;
dvr_entry_t *de;
- de = htsp_findDvrEntry(htsp, in, &out, 1);
+ de = htsp_findDvrEntry(htsp, in, &out, 0);
if (de == NULL)
return out;
if(dvr_autorec_entry_verify(dae, htsp->htsp_granted_access, 0))
return htsp_error(htsp, N_("User does not have access"));
- /* Check access old channel*/
- if (dae->dae_channel && !htsp_user_access_channel(htsp, dae->dae_channel))
- return htsp_error(htsp, N_("User does not have access"));
-
/* Do we have a channel? No = keep old one */
if (!htsmsg_get_s64(in, "channelId", &s64)) //s64 -> -1 = any channel
{
if(dvr_autorec_entry_verify(dae, htsp->htsp_granted_access, 0))
return htsp_error(htsp, N_("User does not have access"));
- /* Check access */
- if (dae->dae_channel && !htsp_user_access_channel(htsp, dae->dae_channel))
- return htsp_error(htsp, N_("User does not have access"));
-
autorec_destroy_by_id(daeId, 1);
return htsp_success();
if(dvr_timerec_entry_verify(dte, htsp->htsp_granted_access, 0))
return htsp_error(htsp, N_("User does not have access"));
- /* Check access old channel */
- if (dte->dte_channel && !htsp_user_access_channel(htsp, dte->dte_channel))
- return htsp_error(htsp, N_("User does not have access"));
-
/* Do we have a channel? No = keep old one */
if (!htsmsg_get_s64(in, "channelId", &s64)) //s64 -> -1 = any channel
{
if(dvr_timerec_entry_verify(dte, htsp->htsp_granted_access, 0))
return htsp_error(htsp, N_("User does not have access"));
- /* Check access */
- if (dte->dte_channel && !htsp_user_access_channel(htsp, dte->dte_channel))
- return htsp_error(htsp, N_("User does not have access"));
-
timerec_destroy_by_id(dteId, 1);
return htsp_success();
if(dvr_entry_verify(de, htsp->htsp_granted_access, 1))
return htsp_error(htsp, N_("User does not have access"));
- /* Check access */
- if (!htsp_user_access_channel(htsp, de->de_channel))
- return htsp_error(htsp, N_("User does not have access"));
-
htsmsg_t *msg = htsmsg_create_map();
dvr_cutpoint_list_t *list = dvr_get_cutpoint_list(de);
if (dvr_entry_verify(de, htsp->htsp_granted_access, 1))
return htsp_error(htsp, N_("User does not have access"));
- if (!htsp_user_access_channel(htsp, de->de_channel))
- return htsp_error(htsp, N_("User does not have access"));
-
filename = dvr_get_filename(de);
if (filename == NULL)
htsp_connection_t *htsp;
LIST_FOREACH(htsp, &htsp_async_connections, htsp_async_link) {
if (htsp->htsp_async_mode & HTSP_ASYNC_ON)
- if (!dvr_entry_verify(de, htsp->htsp_granted_access, 1) &&
- htsp_user_access_channel(htsp, de->de_channel)) {
+ if (!dvr_entry_verify(de, htsp->htsp_granted_access, 1)) {
htsmsg_t *m = msg ? htsmsg_copy(msg)
: htsp_build_dvrentry(htsp, de, method, htsp->htsp_language);
htsp_send_message(htsp, m, NULL);
htsp_connection_t *htsp;
LIST_FOREACH(htsp, &htsp_async_connections, htsp_async_link) {
if (htsp->htsp_async_mode & HTSP_ASYNC_ON) {
- if ((dae->dae_channel == NULL || htsp_user_access_channel(htsp, dae->dae_channel)) &&
- !dvr_autorec_entry_verify(dae, htsp->htsp_granted_access, 1)) {
+ if (!dvr_autorec_entry_verify(dae, htsp->htsp_granted_access, 1)) {
htsmsg_t *m = msg ? htsmsg_copy(msg)
: htsp_build_autorecentry(htsp, dae, method);
htsp_send_message(htsp, m, NULL);
htsp_connection_t *htsp;
LIST_FOREACH(htsp, &htsp_async_connections, htsp_async_link) {
if (htsp->htsp_async_mode & HTSP_ASYNC_ON) {
- if ((dte->dte_channel == NULL || htsp_user_access_channel(htsp, dte->dte_channel)) &&
- !dvr_timerec_entry_verify(dte, htsp->htsp_granted_access, 1)) {
+ if (!dvr_timerec_entry_verify(dte, htsp->htsp_granted_access, 1)) {
htsmsg_t *m = msg ? htsmsg_copy(msg)
: htsp_build_timerecentry(htsp, dte, method);
htsp_send_message(htsp, m, NULL);