summaryrefslogtreecommitdiff
path: root/pages/setup.ecpp
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2009-09-07 19:13:48 +0200
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2009-09-07 19:13:48 +0200
commit4cf240cb6faa33f1e51d1040ee6162f245525f8f (patch)
tree477ccddccc832dff245fc1590d7a52fbd59f59b5 /pages/setup.ecpp
parentac835e1d5366908e0c3a706ed3c9298041c4bad9 (diff)
downloadvdr-plugin-live-4cf240cb6faa33f1e51d1040ee6162f245525f8f.tar.gz
vdr-plugin-live-4cf240cb6faa33f1e51d1040ee6162f245525f8f.tar.bz2
new user management within setup that also handles different user rights
Diffstat (limited to 'pages/setup.ecpp')
-rw-r--r--pages/setup.ecpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/pages/setup.ecpp b/pages/setup.ecpp
index cc1db8c..845e4b7 100644
--- a/pages/setup.ecpp
+++ b/pages/setup.ecpp
@@ -3,6 +3,7 @@
#include <vdr/tools.h>
#include "setup.h"
#include "tools.h"
+#include "users.h"
#include "i18n.h"
using namespace vdrlive;
@@ -33,7 +34,9 @@ using namespace std;
</%session>
<%include>page_init.eh</%include>
<%cpp>
-if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+if (!logged_in && LiveSetup().UseAuth() ) return reply.redirect("login.html");
+if (!cUser::CurrentUserHasRightTo(UR_EDITSETUP))
+ throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") );
#define SELECTIF(x) reply.out() << ( (x) ? "selected=\"selected\"" : "" );
#define CHECKIF(x) reply.out() << ( (x) ? "checked=\"checked\"" : "" );
@@ -152,6 +155,10 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<td><input type="password" name="pass" value="<$ pass $>" id="pass" onchange="setauthchanged(this)" /></td>
</tr>
<tr>
+ <td class="label"><div class="withmargin"><a href="users.html"><$ tr("User management") $></a></div></td>
+ <td/>
+ </tr>
+ <tr>
<td class="label"><div class="withmargin"><$ tr("Local net (no login required)") $>:</div></td>
<td><input type="text" name="localnetmask" value="<$ localnetmask $>" id="localnetmask" /></td>
</tr>
@@ -282,4 +289,3 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<%include>page_exit.eh</%include>
-