summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brückner <mb (plus) vdr (at) gekrumbel (dot) de>2007-05-04 19:51:30 +0000
committerMichael Brückner <mb (plus) vdr (at) gekrumbel (dot) de>2007-05-04 19:51:30 +0000
commit9768f3ab067bd56dc83a14b3955f5d371707106e (patch)
tree6553f040711f394ed93e9528a67d6175b0d92b21
parente6e4c0144fbf45181de6e997fe956ced29cc8bf5 (diff)
downloadvdr-plugin-live-9768f3ab067bd56dc83a14b3955f5d371707106e.tar.gz
vdr-plugin-live-9768f3ab067bd56dc83a14b3955f5d371707106e.tar.bz2
- added login protection to various pages that i did forget
-rw-r--r--pages/channels_widget.ecpp6
-rw-r--r--pages/error.ecpp9
-rw-r--r--pages/event_widget.ecpp6
-rw-r--r--pages/ibox.ecpp6
-rw-r--r--pages/keypress.ecpp7
-rw-r--r--pages/menu.ecpp9
-rw-r--r--pages/play_recording.ecpp5
-rw-r--r--pages/screenshot.ecpp6
8 files changed, 53 insertions, 1 deletions
diff --git a/pages/channels_widget.ecpp b/pages/channels_widget.ecpp
index df9219f..ed6d30e 100644
--- a/pages/channels_widget.ecpp
+++ b/pages/channels_widget.ecpp
@@ -13,6 +13,12 @@ using namespace vdrlive;
onchange;
bool channelid = false;
</%args>
+<%session scope="global">
+bool logged_in(false);
+</%session>
+<{
+if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+}>
<%cpp>
ReadLock channelsLock( Channels );
if ( !channelsLock )
diff --git a/pages/error.ecpp b/pages/error.ecpp
index e7bc8c5..bb82887 100644
--- a/pages/error.ecpp
+++ b/pages/error.ecpp
@@ -1,5 +1,8 @@
<%pre>
#include <vdr/i18n.h>
+#include "setup.h"
+
+using namespace vdrlive;
</%pre>
<%args>
@@ -7,6 +10,12 @@
errorTitle = tr("Page error");
errorMessage;
</%args>
+<%session scope="global">
+bool logged_in(false);
+</%session>
+<{
+if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+}>
<& pageelems.doc_type &>
<html>
<head>
diff --git a/pages/event_widget.ecpp b/pages/event_widget.ecpp
index 2dd847e..b4a80cb 100644
--- a/pages/event_widget.ecpp
+++ b/pages/event_widget.ecpp
@@ -17,6 +17,12 @@ channel_name;
start;
end;
</%args>
+<%session scope="global">
+bool logged_in(false);
+</%session>
+<{
+if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+}>
<table class="event" cellpadding="0" cellspacing="0">
<tr><td class="station" colspan="2"><$ channel_name $></td></tr>
diff --git a/pages/ibox.ecpp b/pages/ibox.ecpp
index 7ca6069..e2b2fb8 100644
--- a/pages/ibox.ecpp
+++ b/pages/ibox.ecpp
@@ -7,6 +7,7 @@
#include <vdr/device.h>
#include "exception.h"
+#include "setup.h"
#include "tools.h"
#include "epg_events.h"
@@ -17,12 +18,15 @@ using namespace std;
<%args>
int update;
</%args>
+<%session scope="global">
+bool logged_in(false);
+</%session>
<%cpp>
+ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
EpgEvents epgEvents;
string EMPTY_STR;
tChannelID prev_chan;
tChannelID next_chan;
-
reply.setContentType( "application/xml" );
if (cReplayControl::NowReplaying()) {
diff --git a/pages/keypress.ecpp b/pages/keypress.ecpp
index a1f36fa..efcb1a3 100644
--- a/pages/keypress.ecpp
+++ b/pages/keypress.ecpp
@@ -1,11 +1,18 @@
<%pre>
#include <vdr/remote.h>
+#include "setup.h"
+
+using namespace vdrlive;
</%pre>
<%args>
int keycode = kNone;
</%args>
+<%session scope="global">
+bool logged_in(false);
+</%session>
<%cpp>
+ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
reply.setContentType("application/xml");
</%cpp>
<?xml version="1.0"?>
diff --git a/pages/menu.ecpp b/pages/menu.ecpp
index fb6b2f9..5acbc13 100644
--- a/pages/menu.ecpp
+++ b/pages/menu.ecpp
@@ -2,16 +2,25 @@
#include <vdr/plugin.h>
#include <vdr/config.h>
#include "setup.h"
+
+using namespace vdrlive;
+
</%pre>
<%args>
active;
component;
</%args>
+<%session scope="global">
+bool logged_in(false);
+</%session>
<%request scope="page">
std::string set_active;
std::string set_component;
</%request>
<{
+if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+}>
+<{
using namespace vdrlive;
diff --git a/pages/play_recording.ecpp b/pages/play_recording.ecpp
index d314ace..3d95352 100644
--- a/pages/play_recording.ecpp
+++ b/pages/play_recording.ecpp
@@ -2,6 +2,7 @@
#include <string>
#include <vdr/recording.h>
#include "exception.h"
+#include "setup.h"
#include "tasks.h"
#include "tools.h"
@@ -12,7 +13,11 @@ using namespace vdrlive;
<%args>
string param;
</%args>
+<%session scope="global">
+bool logged_in(false);
+</%session>
<%cpp>
+ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
reply.setContentType( "application/xml" );
ReplayRecordingTask task( param );
diff --git a/pages/screenshot.ecpp b/pages/screenshot.ecpp
index b8d8617..0fc1a3c 100644
--- a/pages/screenshot.ecpp
+++ b/pages/screenshot.ecpp
@@ -1,4 +1,6 @@
<%pre>
+#include <vdr/config.h>
+#include "setup.h"
#include "grab.h"
using namespace vdrlive;
@@ -9,7 +11,11 @@ int quality = 80;
int width = 320;
int height = 240;
</%args>
+<%session scope="global">
+bool logged_in(false);
+</%session>
<%cpp>
+if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
reply.setContentType("image/jpg");
GrabImageInfo image = LiveGrabImageManager().GetImage();