From 3b53981b41a59c7935e372a56737c14857432bae Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Wed, 10 Dec 2008 18:44:40 +0100 Subject: ssl patches by Matthias (asg) --- README | 6 ++++-- pages/vlc.ecpp | 11 ++--------- setup.cpp | 16 ++++++++++++---- setup.h | 2 ++ tntconfig.cpp | 29 ++++++++--------------------- 5 files changed, 28 insertions(+), 36 deletions(-) diff --git a/README b/README index 3eaa56d..550e398 100644 --- a/README +++ b/README @@ -161,8 +161,10 @@ SSL Commandline options -s PORT, --sslport=PORT use PORT to listen for incoming ssl connections (default: 8443) - -c CERT, --cert=CERT path to a custom ssl certificate + -c CERT, --cert=CERT path to a custom ssl certificate file (default: $CONFIGDIR/live.pem) + -k KEY, --cert=CERT path to a custom ssl certificate key file + (default: $CONFIGDIR/live-key.pem) Creating a self-signed SSL server certificate @@ -172,7 +174,7 @@ To create a self-signed certificate file you`ll have to run this litte command. $> cd /put/your/path/here/vdr/plugins/live - $> openssl req -new -x509 -keyout server.pem -out live.pem -days 365 -nodes + $> openssl req -new -x509 -keyout live-key.pem -out live.pem -days 365 -nodes While generating the certifcate you`ll be asked to answer a couple of questions. When it prompts to enter the "Common Name" you`ll have to diff --git a/pages/vlc.ecpp b/pages/vlc.ecpp index d1afd67..db2a74d 100644 --- a/pages/vlc.ecpp +++ b/pages/vlc.ecpp @@ -96,9 +96,7 @@ using namespace vdrlive; <%cpp> #if TNTVERSION >= 1606 string server = request.getHost(); - if (Channel != 0) { - server = server.substr(0, server.rfind(':')); - } + server = server.substr(0, server.rfind(':')); #else string server = request.getServerIp(); #endif @@ -108,12 +106,7 @@ using namespace vdrlive; videourl = string("http://") + server + ":" + lexical_cast(streamdevPort) + "/" + LiveSetup().GetStreamdevType() + "/" + *Channel->GetChannelID().ToString(); } else { -#if TNTVERSION >= 1606 -# define SERVER_AND_PORT server -#else -# define SERVER_AND_PORT server + ":" + lexical_cast(LiveSetup().GetServerPort()); -#endif - videourl = string("http://") + SERVER_AND_PORT + "/recstream.html?recid=" + recid; + videourl = string("http://") + server + ":" + lexical_cast(LiveSetup().GetServerPort()) + "/recstream.html?recid=" + recid; } diff --git a/setup.cpp b/setup.cpp index 2be03cd..2bdf7bd 100644 --- a/setup.cpp +++ b/setup.cpp @@ -26,6 +26,7 @@ Setup::Setup(): #if TNTSSLSUPPORT m_serverSslPort( 8443 ), m_serverSslCert(), + m_serverSslKey(), #endif m_lastChannel( 0 ), m_screenshotInterval( 1000 ), @@ -57,6 +58,7 @@ bool Setup::ParseCommandLine( int argc, char* argv[] ) #if TNTSSLSUPPORT { "sslport", required_argument, NULL, 's' }, { "cert", required_argument, NULL, 'c' }, + { "key", required_argument, NULL, 'k' }, #endif { 0 } }; @@ -71,6 +73,7 @@ bool Setup::ParseCommandLine( int argc, char* argv[] ) #if TNTSSLSUPPORT case 's': m_serverSslPort = atoi( optarg ); break; case 'c': m_serverSslCert = optarg; break; + case 'k': m_serverSslKey = optarg; break; #endif default: return false; } @@ -96,6 +99,7 @@ char const* Setup::CommandLineHelp() const << " -s PORT, --sslport=PORT use PORT to listen for incoming ssl connections\n" " (default: " << m_serverSslPort << ")\n" << " -c CERT, --cert=CERT full path to a custom ssl certificate file\n" + << " -k KEY, --key=KEY full path to a custom ssl certificate key file\n" #endif << " -l level, --log=level log level for tntnet (values: INFO, DEBUG,...)\n" << " -e , --epgimages= directory for epgimages\n"; @@ -153,16 +157,20 @@ bool Setup::CheckServerSslPort() bool Setup::CheckServerIps() { + struct in6_addr buf; + if ( m_serverIps.empty() ) { - m_serverIps.push_back( "0.0.0.0" ); + m_serverIps.push_back( "::" ); return true; } for ( IpList::const_iterator ip = m_serverIps.begin(); ip != m_serverIps.end(); ++ip ) { if ( inet_addr( ip->c_str() ) == static_cast< in_addr_t >( -1 ) ) { - esyslog( "ERROR: live server ip %s is not a valid ip address", ip->c_str() ); - cerr << "ERROR: live server ip " << *ip << " is not a valid ip address" << endl; - return false; + if ( ! inet_pton( AF_INET6, ip->c_str(), &buf ) ) { + esyslog( "ERROR: live server ip %s is not a valid ip address", ip->c_str() ); + cerr << "ERROR: live server ip " << *ip << " is not a valid ip address" << endl; + return false; + } } } return true; diff --git a/setup.h b/setup.h index 1cf153f..dd315c1 100644 --- a/setup.h +++ b/setup.h @@ -34,6 +34,7 @@ class Setup #if TNTSSLSUPPORT int GetServerSslPort() const { return m_serverSslPort; } std::string GetServerSslCert() const { return m_serverSslCert; } + std::string GetServerSslKey() const { return m_serverSslKey; } #endif IpList const& GetServerIps() const { return m_serverIps; } // vdr-setup @@ -106,6 +107,7 @@ class Setup #if TNTSSLSUPPORT int m_serverSslPort; std::string m_serverSslCert; + std::string m_serverSslKey; static std::string m_configDirectory; #endif IpList m_serverIps; diff --git a/tntconfig.cpp b/tntconfig.cpp index 71bee4d..23943a5 100644 --- a/tntconfig.cpp +++ b/tntconfig.cpp @@ -128,24 +128,6 @@ namespace vdrlive { for ( Setup::IpList::const_iterator ip = ips.begin(); ip != ips.end(); ++ip ) { file << "Listen " << *ip << " " << port << endl; } - -// not used any more see below: #ifdef TNTVERS7 -// not used any more see below: int s_port = LiveSetup().GetServerSslPort(); -// not used any more see below: string s_cert = LiveSetup().GetServerSslCert(); -// not used any more see below: -// not used any more see below: if (s_cert.empty()) { -// not used any more see below: s_cert = configDir + "/live.pem"; -// not used any more see below: } -// not used any more see below: -// not used any more see below: if ( ifstream( s_cert.c_str() ) ) { -// not used any more see below: for ( Setup::IpList::const_iterator ip = ips.begin(); ip != ips.end(); ++ip ) { -// not used any more see below: file << "SslListen " << *ip << " " << s_port << " " << s_cert << endl; -// not used any more see below: } -// not used any more see below: } -// not used any more see below: else { -// not used any more see below: esyslog( "ERROR: %s: %s", s_cert.c_str(), strerror( errno ) ); -// not used any more see below: } -// not used any more see below: #endif } #endif @@ -277,18 +259,23 @@ namespace vdrlive { #if TNTSSLSUPPORT int s_port = LiveSetup().GetServerSslPort(); string s_cert = LiveSetup().GetServerSslCert(); + string s_key = LiveSetup().GetServerSslKey(); if (s_cert.empty()) { s_cert = configDir + "/live.pem"; } - if ( ifstream( s_cert.c_str() ) ) { + if (s_key.empty()) { + s_key = configDir + "/live-key.pem"; + } + + if ( ifstream( s_cert.c_str() ) && ifstream( s_key.c_str() ) ) { for ( Setup::IpList::const_iterator ip = ips.begin(); ip != ips.end(); ++ip ) { - app.sslListen(s_cert, s_cert, *ip, s_port); + app.sslListen(s_cert, s_key, *ip, s_port); } } else { - esyslog( "ERROR: %s: %s", s_cert.c_str(), strerror( errno ) ); + esyslog( "ERROR: Unable to load cert/key (%s/%s): %s", s_cert.c_str(), s_key.c_str(), strerror( errno ) ); } #endif // TNTSSLSUPPORT -- cgit v1.2.3 From 8c131a1710f1b8c83c09e4f247cc0ba44c0ec4bb Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Sun, 22 Feb 2009 13:57:56 +0100 Subject: fix buggy commit --- setup.cpp | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/setup.cpp b/setup.cpp index 81971fd..5b6a9f3 100644 --- a/setup.cpp +++ b/setup.cpp @@ -176,40 +176,19 @@ namespace { bool Setup::CheckServerIps() { - struct in6_addr buf; - if ( m_serverIps.empty() ) { -<<<<<<< HEAD:setup.cpp -======= // add a default IPv4 listener address m_serverIps.push_back( "0.0.0.0" ); // and be prepared for IPv6 only hosts. ->>>>>>> tadi/master:setup.cpp m_serverIps.push_back( "::" ); -<<<<<<< HEAD:setup.cpp -======= // we assume these are ok :) ->>>>>>> tadi/master:setup.cpp return true; } -<<<<<<< HEAD:setup.cpp - for ( IpList::const_iterator ip = m_serverIps.begin(); ip != m_serverIps.end(); ++ip ) { - if ( inet_addr( ip->c_str() ) == static_cast< in_addr_t >( -1 ) ) { - if ( ! inet_pton( AF_INET6, ip->c_str(), &buf ) ) { - esyslog( "ERROR: live server ip %s is not a valid ip address", ip->c_str() ); - cerr << "ERROR: live server ip " << *ip << " is not a valid ip address" << endl; - return false; - } - } - } - return true; -======= IpList::iterator i = partition(m_serverIps.begin(), m_serverIps.end(), IpValidator()); m_serverIps.erase(i, m_serverIps.end()); return !m_serverIps.empty(); ->>>>>>> tadi/master:setup.cpp } std::string const Setup::GetMD5HashAdminPassword() const -- cgit v1.2.3 From 4cf240cb6faa33f1e51d1040ee6162f245525f8f Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Mon, 7 Sep 2009 19:13:48 +0200 Subject: new user management within setup that also handles different user rights --- Makefile | 3 +- doc/ChangeLog | 4 +++ live.cpp | 8 ++++- pages/Makefile | 2 +- pages/edit_searchtimer.ecpp | 4 +++ pages/edit_timer.ecpp | 4 +++ pages/login.ecpp | 5 ++- pages/menu.ecpp | 1 + pages/play_recording.ecpp | 3 ++ pages/remote.ecpp | 4 +++ pages/searchtimers.ecpp | 6 +++- pages/setup.ecpp | 10 ++++-- pages/switch_channel.ecpp | 4 +++ pages/timers.ecpp | 3 ++ pages/vlc.ecpp | 3 ++ po/ca_ES.po | 63 ++++++++++++++++++++++++++++++++-- po/cs_CZ.po | 63 ++++++++++++++++++++++++++++++++-- po/da_DK.po | 63 ++++++++++++++++++++++++++++++++-- po/de_DE.po | 70 +++++++++++++++++++++++++++++++++++--- po/el_GR.po | 63 ++++++++++++++++++++++++++++++++-- po/es_ES.po | 63 ++++++++++++++++++++++++++++++++-- po/et_EE.po | 63 ++++++++++++++++++++++++++++++++-- po/fi_FI.po | 82 +++++++++++++++++++++++++++++++++++++++++++-- po/fr_FR.po | 82 +++++++++++++++++++++++++++++++++++++++++++-- po/hr_HR.po | 63 ++++++++++++++++++++++++++++++++-- po/hu_HU.po | 63 ++++++++++++++++++++++++++++++++-- po/it_IT.po | 82 +++++++++++++++++++++++++++++++++++++++++++-- po/nl_NL.po | 74 ++++++++++++++++++++++++++++++++++++++-- po/nn_NO.po | 63 ++++++++++++++++++++++++++++++++-- po/pl_PL.po | 63 ++++++++++++++++++++++++++++++++-- po/pt_PT.po | 63 ++++++++++++++++++++++++++++++++-- po/ro_RO.po | 63 ++++++++++++++++++++++++++++++++-- po/ru_RU.po | 63 ++++++++++++++++++++++++++++++++-- po/sl_SI.po | 63 ++++++++++++++++++++++++++++++++-- po/sv_SE.po | 63 ++++++++++++++++++++++++++++++++-- po/tr_TR.po | 63 ++++++++++++++++++++++++++++++++-- 36 files changed, 1390 insertions(+), 72 deletions(-) diff --git a/Makefile b/Makefile index 62cf856..71ecae5 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,8 @@ VERSIONSUFFIX = gen_version_suffix.h PLUGINOBJS = $(PLUGIN).o thread.o tntconfig.o setup.o i18n.o timers.o \ tools.o recman.o tasks.o status.o epg_events.o epgsearch.o \ - grab.o md5.o filecache.o livefeatures.o preload.o timerconflict.o + grab.o md5.o filecache.o livefeatures.o preload.o timerconflict.o \ + users.o WEBLIBS = pages/libpages.a css/libcss.a javascript/libjavascript.a diff --git a/doc/ChangeLog b/doc/ChangeLog index e7b207f..d2ac030 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2009-09-07 Christian Wieninger + * new user management within setup that also handles different + user rights + 2008-11-19 Christian Wieninger * new setup option to display channels without EPG diff --git a/live.cpp b/live.cpp index f18949c..32a69b6 100644 --- a/live.cpp +++ b/live.cpp @@ -1,5 +1,5 @@ /* - * httpd.c: A plugin for the Video Disk Recorder + * live.cpp: A plugin for the Video Disk Recorder * * See the README file for copyright information and how to reach the author. * @@ -15,6 +15,7 @@ #include "thread.h" #include "timers.h" #include "preload.h" +#include "users.h" namespace vdrlive { @@ -25,6 +26,8 @@ const char *Plugin::DESCRIPTION = LIVESUMMARY; std::string Plugin::m_configDirectory; +cUsers Users; + Plugin::Plugin(void) { } @@ -52,6 +55,9 @@ bool Plugin::Start(void) // preload files into file Cache PreLoadFileCache(m_configDirectory); + // load users + Users.Load(AddDirectory(m_configDirectory.c_str(), "users.conf"), true); + // XXX error handling m_thread.reset( new ServerThread ); m_thread->Start(); diff --git a/pages/Makefile b/pages/Makefile index f7512f5..c49c673 100644 --- a/pages/Makefile +++ b/pages/Makefile @@ -17,7 +17,7 @@ OBJS = menu.o recordings.o schedule.o screenshot.o timers.o \ searchepg.o login.o ibox.o xmlresponse.o play_recording.o \ pause_recording.o stop_recording.o ffw_recording.o \ rwd_recording.o setup.o content.o epginfo.o timerconflicts.o \ - recstream.o + recstream.o users.o edit_user.o ### Default rules: diff --git a/pages/edit_searchtimer.ecpp b/pages/edit_searchtimer.ecpp index fbd2cce..69103a1 100644 --- a/pages/edit_searchtimer.ecpp +++ b/pages/edit_searchtimer.ecpp @@ -10,6 +10,7 @@ #include "epgsearch.h" #include "setup.h" #include "i18n.h" +#include "users.h" using namespace std; using namespace vdrlive; @@ -99,6 +100,9 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); }> <%cpp> + if (!cUser::CurrentUserHasRightTo(UR_EDITSTIMERS)) + 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\"" : "" ); diff --git a/pages/edit_timer.ecpp b/pages/edit_timer.ecpp index 47a6766..299f35a 100644 --- a/pages/edit_timer.ecpp +++ b/pages/edit_timer.ecpp @@ -13,6 +13,7 @@ #include "i18n.h" #include "livefeatures.h" #include "epgsearch.h" +#include "users.h" using namespace std; using namespace vdrlive; @@ -57,6 +58,9 @@ cTimer* timer; <%cpp> if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); + if (!cUser::CurrentUserHasRightTo(UR_EDITTIMERS)) + throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") ); + bool ajaxReq = !async.empty() && (lexical_cast(async) != 0); tChannelID channelid = tChannelID(); diff --git a/pages/login.ecpp b/pages/login.ecpp index 754ec82..a49f1fa 100644 --- a/pages/login.ecpp +++ b/pages/login.ecpp @@ -1,6 +1,7 @@ <%pre> #include "tools.h" #include "setup.h" +#include "users.h" using namespace std; using namespace vdrlive; @@ -19,13 +20,15 @@ bool logged_in(false); std::string message; if (action == "login") { - if ((login == LiveSetup().GetAdminLogin()) && (MD5Hash(password) == LiveSetup().GetMD5HashAdminPassword())) { + if (Users.ValidLogin(login, password)) { logged_in = true; + cUsers::logged_in_user = login; } else { message = tr("Wrong username or password"); } } else if (action == "logout") { logged_in = false; + cUsers::logged_in_user = ""; } LiveSetup().CheckLocalNet(request.getPeerIp()); diff --git a/pages/menu.ecpp b/pages/menu.ecpp index a998169..1159014 100644 --- a/pages/menu.ecpp +++ b/pages/menu.ecpp @@ -96,6 +96,7 @@ if (!component.empty()) { <& menu.component current=("recordings") &> <& menu.component current=("remote") &> + <& menu.component current=("users") &> diff --git a/pages/play_recording.ecpp b/pages/play_recording.ecpp index 5a26b41..1f018de 100644 --- a/pages/play_recording.ecpp +++ b/pages/play_recording.ecpp @@ -5,6 +5,7 @@ #include "setup.h" #include "tasks.h" #include "tools.h" +#include "users.h" using namespace std; using namespace vdrlive; @@ -18,6 +19,8 @@ using namespace vdrlive; <%cpp> if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); + if (!cUser::CurrentUserHasRightTo(UR_STARTREPLAY)) + throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") ); reply.setContentType( "application/xml" ); PlayRecordingTask task( param ); diff --git a/pages/remote.ecpp b/pages/remote.ecpp index dd45cd0..dc0bf13 100644 --- a/pages/remote.ecpp +++ b/pages/remote.ecpp @@ -6,6 +6,7 @@ #include "grab.h" #include "setup.h" #include "tools.h" +#include "users.h" using namespace std; using namespace vdrlive; @@ -25,6 +26,9 @@ bool logged_in(false); if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); }> <%cpp> + if (!cUser::CurrentUserHasRightTo(UR_USEREMOTE)) + throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") ); + pageTitle = tr("Remote Control"); ReadLock channelsLock( Channels ); diff --git a/pages/searchtimers.ecpp b/pages/searchtimers.ecpp index fc2eaf8..dc8bc53 100644 --- a/pages/searchtimers.ecpp +++ b/pages/searchtimers.ecpp @@ -4,6 +4,7 @@ #include "epgsearch.h" #include "tools.h" #include "setup.h" +#include "users.h" using namespace vdrlive; using namespace std; @@ -27,8 +28,11 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); if ( !searchtimerid.empty() ) { if (action == "toggle") timers.ToggleActive(searchtimerid); - if (action == "delete") + if (action == "delete") { + if (!cUser::CurrentUserHasRightTo(UR_DELSTIMERS)) + throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") ); timers.Delete(searchtimerid); + } } if (action == "update") timers.TriggerUpdate(); 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 #include "setup.h" #include "tools.h" +#include "users.h" #include "i18n.h" using namespace vdrlive; @@ -33,7 +34,9 @@ using namespace std; <%include>page_init.eh <%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\"" : "" ); @@ -151,6 +154,10 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<$ tr("Admin password") $>:
+ + + +
<$ tr("Local net (no login required)") $>:
@@ -282,4 +289,3 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <%include>page_exit.eh - diff --git a/pages/switch_channel.ecpp b/pages/switch_channel.ecpp index 9b8b48b..2cffefc 100644 --- a/pages/switch_channel.ecpp +++ b/pages/switch_channel.ecpp @@ -3,6 +3,7 @@ #include "exception.h" #include "tasks.h" #include "tools.h" +#include "users.h" using namespace std; using namespace vdrlive; @@ -16,6 +17,9 @@ using namespace vdrlive; bool ajaxReq = !async.empty() && (lexical_cast(async) != 0); string referrer; + if (!cUser::CurrentUserHasRightTo(UR_SWITCHCHNL)) + throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") ); + if (ajaxReq) { reply.setContentType( "application/xml" ); } diff --git a/pages/timers.ecpp b/pages/timers.ecpp index 93d2e91..2a9ee4c 100644 --- a/pages/timers.ecpp +++ b/pages/timers.ecpp @@ -8,6 +8,7 @@ #include "epg_events.h" #include "timerconflict.h" #include "livefeatures.h" +#include "users.h" using namespace std; using namespace vdrlive; @@ -44,6 +45,8 @@ static const size_t maximumDescriptionLength = 300; if ( timer == 0 ) throw HtmlError( tr("Couldn't find timer. Maybe you mistyped your request?") ); if (action == "delete") { + if (!cUser::CurrentUserHasRightTo(UR_DELTIMERS)) + throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") ); LiveTimerManager().DelTimer(timer); timerNotifier.SetTimerModification(); } diff --git a/pages/vlc.ecpp b/pages/vlc.ecpp index 445cc94..065969c 100644 --- a/pages/vlc.ecpp +++ b/pages/vlc.ecpp @@ -4,6 +4,7 @@ #include #include "setup.h" #include "tools.h" +#include "users.h" using namespace std; using namespace vdrlive; @@ -23,6 +24,8 @@ using namespace vdrlive; <%include>page_init.eh <%cpp> if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); + if (!cUser::CurrentUserHasRightTo(UR_STARTREPLAY)) + throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") ); bool asyncReq = !async.empty() && (lexical_cast(async) != 0); diff --git a/po/ca_ES.po b/po/ca_ES.po index 3de8bcd..2f0b0e2 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -125,6 +125,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -369,6 +372,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -417,9 +468,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -672,6 +720,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -735,6 +786,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/cs_CZ.po b/po/cs_CZ.po index b14492f..1671f19 100644 --- a/po/cs_CZ.po +++ b/po/cs_CZ.po @@ -123,6 +123,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -367,6 +370,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -415,9 +466,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -670,6 +718,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -733,6 +784,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/da_DK.po b/po/da_DK.po index c5801c1..c82a784 100644 --- a/po/da_DK.po +++ b/po/da_DK.po @@ -123,6 +123,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -367,6 +370,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -415,9 +466,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -670,6 +718,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -733,6 +784,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/de_DE.po b/po/de_DE.po index f7a01c9..6a890f9 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -125,6 +125,9 @@ msgstr "Timerkonflikte entdeckt" msgid "Couldn't aquire access to channels, please try again later." msgstr "Zugriff auf die Kanäle wurde verweigert. Bitte später versuchen." +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "Leider nicht erlaubt. Bitte kontaktieren Sie Ihren Administrator!" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "Keinen Suchtimer gefunden. Möglicherweise ein Tippfehler in der Anfrage?" @@ -369,6 +372,54 @@ msgstr "Neuen Timer anlegen" msgid "Weekday" msgstr "Wochentag" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "Konnte Benutzer nicht finden. Evtl. fehlerhafte Anforderung?" + +msgid "This user name is already in use!" +msgstr "Dieser Benutzername wird bereits verwendet!" + +msgid "Edit user" +msgstr "Benutzer bearbeiten" + +msgid "New user" +msgstr "Neuen Benutzer anlegen" + +msgid "Name" +msgstr "Name" + +msgid "Password" +msgstr "Passwort" + +msgid "User rights" +msgstr "Benutzerrechte" + +msgid "Edit setup" +msgstr "Einstellungen bearbeiten" + +msgid "Add or edit timers" +msgstr "Timer hinzufügen oder ändern" + +msgid "Delete timers" +msgstr "Timer löschen" + +msgid "Delete recordings" +msgstr "Aufnahmen löschen" + +msgid "Use remote menu" +msgstr "Menü Fernbedienung nutzen" + +msgid "Start replay" +msgstr "Wiedergabe starten" + +msgid "Switch channel" +msgstr "Zu diesem Kanal umschalten." + +msgid "Add or edit search timers" +msgstr "Suchtimer hinzufügen oder ändern" + +msgid "Delete search timers" +msgstr "Suchtimer löschen" + msgid "Electronic program guide information" msgstr "Elektronische Programminformation" @@ -417,9 +468,6 @@ msgstr "VDR Live Login" msgid "User" msgstr "Benutzer" -msgid "Password" -msgstr "Passwort" - msgid "What's on?" msgstr "Was läuft?" @@ -615,9 +663,8 @@ msgstr "Diese Aufnahme abspielen." msgid "Couldn't find channel or no channels available. Maybe you mistyped your request?" msgstr "Konnte Kanal nicht finden oder keine Kanäle verfügbar. Ist die Anfrage korrekt?" -#, fuzzy msgid "Snapshot interval" -msgstr "Bereich" +msgstr "Snapshot-Intervall" msgid "No schedules available for this channel" msgstr "Für diesen Kanal liegen keine EPG-Informationen vor" @@ -673,6 +720,9 @@ msgstr "Einstellungen gespeichert." msgid "Setup" msgstr "Einstellungen" +msgid "User management" +msgstr "Benutzerverwaltung" + msgid "Local net (no login required)" msgstr "Lokales Netz (keine Anmeldung notwendig)" @@ -736,6 +786,12 @@ msgstr "Keine Timer vorhanden" msgid "Timer is recording." msgstr "Timer zeichnet auf." +msgid "Users" +msgstr "Benutzer" + +msgid "Delete user" +msgstr "Benutzer löschen" + msgid "VLC: live video stream" msgstr "VLC: Video Stream" @@ -809,6 +865,10 @@ msgstr "" msgid "No EPG information available" msgstr "Keine EPG Daten vorhanden" +#, fuzzy +#~ msgid "Please set a name and password for the user!" +#~ msgstr "Bitte Login und Passwort angeben!" + #~ msgid "Interval" #~ msgstr "Intervall" diff --git a/po/el_GR.po b/po/el_GR.po index 861792a..12022ed 100644 --- a/po/el_GR.po +++ b/po/el_GR.po @@ -123,6 +123,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -367,6 +370,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -415,9 +466,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -670,6 +718,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -733,6 +784,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/es_ES.po b/po/es_ES.po index e18f423..3fb7d03 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -123,6 +123,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -367,6 +370,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -415,9 +466,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -670,6 +718,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -733,6 +784,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/et_EE.po b/po/et_EE.po index fc30e56..080f4f5 100644 --- a/po/et_EE.po +++ b/po/et_EE.po @@ -123,6 +123,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -367,6 +370,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -415,9 +466,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -670,6 +718,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -733,6 +784,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/fi_FI.po b/po/fi_FI.po index 8cc81b1..e52af4c 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -123,6 +123,9 @@ msgstr "p msgid "Couldn't aquire access to channels, please try again later." msgstr "Kanavien käyttäminen epäonnistui! Yritä myöhemmin uudelleen." +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "Hakuajastimia ei löydetä! Onko pyyntö oikein kirjoitettu?" @@ -367,6 +370,67 @@ msgstr "Luo uusi ajastin" msgid "Weekday" msgstr "Viikonpäivä" +#, fuzzy +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "Ajastinta ei löydy. Kirjoititko varmasti oikein?" + +msgid "This user name is already in use!" +msgstr "" + +#, fuzzy +msgid "Edit user" +msgstr "Muokkaa ajastinta" + +#, fuzzy +msgid "New user" +msgstr "Luo uusi ajastin" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "Salasana" + +#, fuzzy +msgid "User rights" +msgstr "Käyttäjä" + +#, fuzzy +msgid "Edit setup" +msgstr "Muokkaa ajastinta" + +#, fuzzy +msgid "Add or edit timers" +msgstr "Muokkaa ajastinta" + +#, fuzzy +msgid "Delete timers" +msgstr "Poista ajastin" + +#, fuzzy +msgid "Delete recordings" +msgstr "Poistettu tallenne:" + +#, fuzzy +msgid "Use remote menu" +msgstr "Käytä suosikkina" + +#, fuzzy +msgid "Start replay" +msgstr "Aloitussivu" + +#, fuzzy +msgid "Switch channel" +msgstr "Vaihda kanavalle" + +#, fuzzy +msgid "Add or edit search timers" +msgstr "Muokkaa hakuajastinta" + +#, fuzzy +msgid "Delete search timers" +msgstr "Poista hakuajastin" + msgid "Electronic program guide information" msgstr "Ohjelmaoppaan tiedot" @@ -415,9 +479,6 @@ msgstr "VDR Live - sis msgid "User" msgstr "Käyttäjä" -msgid "Password" -msgstr "Salasana" - msgid "What's on?" msgstr "Menossa?" @@ -672,6 +733,9 @@ msgstr "Asetukset tallennettu." msgid "Setup" msgstr "Asetukset" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "Paikallinen verkko (ei autentikointia)" @@ -735,6 +799,14 @@ msgstr "Ajastinta ei ole m msgid "Timer is recording." msgstr "Ajastinta tallennetaan" +#, fuzzy +msgid "Users" +msgstr "Käyttäjä" + +#, fuzzy +msgid "Delete user" +msgstr "Poista ajastin" + msgid "VLC: live video stream" msgstr "VLC: live-lähetyksen suoratoisto" @@ -810,6 +882,10 @@ msgstr "Interaktiivinen VDR-ymp msgid "No EPG information available" msgstr "" +#, fuzzy +#~ msgid "Please set a name and password for the user!" +#~ msgstr "Aseta käyttäjätunnus sekä salasana!" + #~ msgid "Interval" #~ msgstr "Päivitysväli" diff --git a/po/fr_FR.po b/po/fr_FR.po index b4e14d8..5b35f8f 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -129,6 +129,9 @@ msgstr "Programmation est active." msgid "Couldn't aquire access to channels, please try again later." msgstr "Impossible d'avoir accès à des chaînes, réessayer ultérieurement." +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "Impossible de trouver la programmation de recherche. Peut-être que votre demande de fautes de frappe?" @@ -373,6 +376,67 @@ msgstr "Nouvelle programmation" msgid "Weekday" msgstr "Jour de la semaine" +#, fuzzy +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "N'a pas pu trouver la programmation. Peut-être vous avez une erreur dans votre requête?" + +msgid "This user name is already in use!" +msgstr "" + +#, fuzzy +msgid "Edit user" +msgstr "Editer la programmation" + +#, fuzzy +msgid "New user" +msgstr "Nouvelle programmation" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "Mot de passe" + +#, fuzzy +msgid "User rights" +msgstr "Utilisateur" + +#, fuzzy +msgid "Edit setup" +msgstr "Editer la programmation" + +#, fuzzy +msgid "Add or edit timers" +msgstr "Editer la programmation" + +#, fuzzy +msgid "Delete timers" +msgstr "Effacer la programmation" + +#, fuzzy +msgid "Delete recordings" +msgstr "Enregistrement de série" + +#, fuzzy +msgid "Use remote menu" +msgstr "Utiliser dans le menu favoris" + +#, fuzzy +msgid "Start replay" +msgstr "Page de départ" + +#, fuzzy +msgid "Switch channel" +msgstr "Changer vers cette chaîne. " + +#, fuzzy +msgid "Add or edit search timers" +msgstr "Editer l'expression de recherche" + +#, fuzzy +msgid "Delete search timers" +msgstr "Effacer la programmation de recherche" + msgid "Electronic program guide information" msgstr "Guide électronique d'information des programmes EPG" @@ -421,9 +485,6 @@ msgstr "Session VDR Live" msgid "User" msgstr "Utilisateur" -msgid "Password" -msgstr "Mot de passe" - msgid "What's on?" msgstr "Actuellement?" @@ -679,6 +740,9 @@ msgstr "Param msgid "Setup" msgstr "Configuration" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "Réseau local (non requis)" @@ -745,6 +809,14 @@ msgstr "Aucune programmation d msgid "Timer is recording." msgstr "Enregistrement de série" +#, fuzzy +msgid "Users" +msgstr "Utilisateur" + +#, fuzzy +msgid "Delete user" +msgstr "Effacer la programmation" + msgid "VLC: live video stream" msgstr "VLC: live vidéo stream" @@ -820,6 +892,10 @@ msgstr "" msgid "No EPG information available" msgstr "" +#, fuzzy +#~ msgid "Please set a name and password for the user!" +#~ msgstr "Entrée le nom d'utilisateur et le mot de passe svp!" + #~ msgid "Interval" #~ msgstr "Intervalle" diff --git a/po/hr_HR.po b/po/hr_HR.po index 5ed2647..1a9c76c 100644 --- a/po/hr_HR.po +++ b/po/hr_HR.po @@ -124,6 +124,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -368,6 +371,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -416,9 +467,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -671,6 +719,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -734,6 +785,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/hu_HU.po b/po/hu_HU.po index 9d967d8..9994b70 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -124,6 +124,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -368,6 +371,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -416,9 +467,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -671,6 +719,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -734,6 +785,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/it_IT.po b/po/it_IT.po index c586d4b..f14ad57 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -126,6 +126,9 @@ msgstr "conflitti" msgid "Couldn't aquire access to channels, please try again later." msgstr "Impossibile avere accesso ai canali, riprova più tardi." +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "Impossibile trovare timer ricerca. Hai digitato correttamente la richiesta?" @@ -370,6 +373,67 @@ msgstr "Nuovo timer" msgid "Weekday" msgstr "Giorno della settimana" +#, fuzzy +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "Impossibile trovare timer. Hai digitato correttamente la richiesta?" + +msgid "This user name is already in use!" +msgstr "" + +#, fuzzy +msgid "Edit user" +msgstr "Modifica timer" + +#, fuzzy +msgid "New user" +msgstr "Nuovo timer" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "Password" + +#, fuzzy +msgid "User rights" +msgstr "Utente" + +#, fuzzy +msgid "Edit setup" +msgstr "Modifica timer" + +#, fuzzy +msgid "Add or edit timers" +msgstr "Modifica timer" + +#, fuzzy +msgid "Delete timers" +msgstr "Elimina timer" + +#, fuzzy +msgid "Delete recordings" +msgstr "Registrazione eliminata:" + +#, fuzzy +msgid "Use remote menu" +msgstr "Utilizza nel menu Preferiti" + +#, fuzzy +msgid "Start replay" +msgstr "Pagina iniziale" + +#, fuzzy +msgid "Switch channel" +msgstr "Sintonizza questo canale" + +#, fuzzy +msgid "Add or edit search timers" +msgstr "Modifica timer ricerca" + +#, fuzzy +msgid "Delete search timers" +msgstr "Elimina timer ricerca" + msgid "Electronic program guide information" msgstr "Info Guida Elettronica Programmi (EPG)" @@ -418,9 +482,6 @@ msgstr "Accesso VDR Live" msgid "User" msgstr "Utente" -msgid "Password" -msgstr "Password" - msgid "What's on?" msgstr "In programmazione" @@ -675,6 +736,9 @@ msgstr "Opzioni salvate." msgid "Setup" msgstr "Opzioni" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "Rete locale (nessun accesso richiesto)" @@ -738,6 +802,14 @@ msgstr "Nessun timer definito" msgid "Timer is recording." msgstr "Timer in registrazione." +#, fuzzy +msgid "Users" +msgstr "Utente" + +#, fuzzy +msgid "Delete user" +msgstr "Elimina timer" + msgid "VLC: live video stream" msgstr "VLC: trasmissione video Live" @@ -813,6 +885,10 @@ msgstr "Ambiente interattivo LIVE per VDR" msgid "No EPG information available" msgstr "" +#, fuzzy +#~ msgid "Please set a name and password for the user!" +#~ msgstr "Digita un nome utente e password!" + #~ msgid "Interval" #~ msgstr "Intervallo" diff --git a/po/nl_NL.po b/po/nl_NL.po index 04a026c..9dca46b 100644 --- a/po/nl_NL.po +++ b/po/nl_NL.po @@ -129,6 +129,9 @@ msgstr "Serie's opnemen" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -373,6 +376,64 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +#, fuzzy +msgid "Edit user" +msgstr "Serie's opnemen" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +#, fuzzy +msgid "Edit setup" +msgstr "Serie's opnemen" + +#, fuzzy +msgid "Add or edit timers" +msgstr "Gebruik als zoek timer" + +#, fuzzy +msgid "Delete timers" +msgstr "Serie's opnemen" + +#, fuzzy +msgid "Delete recordings" +msgstr "Serie's opnemen" + +#, fuzzy +msgid "Use remote menu" +msgstr "Gebruik tijd" + +#, fuzzy +msgid "Start replay" +msgstr "Start voor" + +#, fuzzy +msgid "Switch channel" +msgstr "tot kanaal" + +#, fuzzy +msgid "Add or edit search timers" +msgstr "Gebruik als zoek timer" + +#, fuzzy +msgid "Delete search timers" +msgstr "Serie's opnemen" + msgid "Electronic program guide information" msgstr "" @@ -421,9 +482,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -678,6 +736,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -745,6 +806,13 @@ msgstr "" msgid "Timer is recording." msgstr "Serie's opnemen" +msgid "Users" +msgstr "" + +#, fuzzy +msgid "Delete user" +msgstr "Serie's opnemen" + msgid "VLC: live video stream" msgstr "" diff --git a/po/nn_NO.po b/po/nn_NO.po index eee5c2e..df2d80b 100644 --- a/po/nn_NO.po +++ b/po/nn_NO.po @@ -124,6 +124,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -368,6 +371,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -416,9 +467,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -671,6 +719,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -734,6 +785,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/pl_PL.po b/po/pl_PL.po index 82089e0..56203df 100644 --- a/po/pl_PL.po +++ b/po/pl_PL.po @@ -123,6 +123,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -367,6 +370,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -415,9 +466,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -670,6 +718,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -733,6 +784,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/pt_PT.po b/po/pt_PT.po index 7ccecbf..2f39d1f 100644 --- a/po/pt_PT.po +++ b/po/pt_PT.po @@ -123,6 +123,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -367,6 +370,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -415,9 +466,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -670,6 +718,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -733,6 +784,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/ro_RO.po b/po/ro_RO.po index 14b6944..8392c82 100644 --- a/po/ro_RO.po +++ b/po/ro_RO.po @@ -124,6 +124,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -368,6 +371,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -416,9 +467,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -671,6 +719,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -734,6 +785,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/ru_RU.po b/po/ru_RU.po index 8880de2..5431e2d 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -123,6 +123,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -367,6 +370,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -415,9 +466,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -670,6 +718,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -733,6 +784,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/sl_SI.po b/po/sl_SI.po index 8f336cc..532c142 100644 --- a/po/sl_SI.po +++ b/po/sl_SI.po @@ -124,6 +124,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -368,6 +371,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -416,9 +467,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -671,6 +719,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -734,6 +785,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/sv_SE.po b/po/sv_SE.po index 9ffd074..9c3a6a6 100644 --- a/po/sv_SE.po +++ b/po/sv_SE.po @@ -124,6 +124,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -368,6 +371,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -416,9 +467,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -671,6 +719,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -734,6 +785,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" diff --git a/po/tr_TR.po b/po/tr_TR.po index e327e08..221f204 100644 --- a/po/tr_TR.po +++ b/po/tr_TR.po @@ -124,6 +124,9 @@ msgstr "" msgid "Couldn't aquire access to channels, please try again later." msgstr "" +msgid "Sorry, no permission. Please contact your administrator!" +msgstr "" + msgid "Couldn't find searchtimer. Maybe you mistyped your request?" msgstr "" @@ -368,6 +371,54 @@ msgstr "" msgid "Weekday" msgstr "" +msgid "Couldn't find user. Maybe you mistyped your request?" +msgstr "" + +msgid "This user name is already in use!" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "User rights" +msgstr "" + +msgid "Edit setup" +msgstr "" + +msgid "Add or edit timers" +msgstr "" + +msgid "Delete timers" +msgstr "" + +msgid "Delete recordings" +msgstr "" + +msgid "Use remote menu" +msgstr "" + +msgid "Start replay" +msgstr "" + +msgid "Switch channel" +msgstr "" + +msgid "Add or edit search timers" +msgstr "" + +msgid "Delete search timers" +msgstr "" + msgid "Electronic program guide information" msgstr "" @@ -416,9 +467,6 @@ msgstr "" msgid "User" msgstr "" -msgid "Password" -msgstr "" - msgid "What's on?" msgstr "" @@ -671,6 +719,9 @@ msgstr "" msgid "Setup" msgstr "" +msgid "User management" +msgstr "" + msgid "Local net (no login required)" msgstr "" @@ -734,6 +785,12 @@ msgstr "" msgid "Timer is recording." msgstr "" +msgid "Users" +msgstr "" + +msgid "Delete user" +msgstr "" + msgid "VLC: live video stream" msgstr "" -- cgit v1.2.3 From 1a19a11081e56aff745ca0ba625187fabc54fb94 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Tue, 8 Sep 2009 19:50:00 +0200 Subject: new files for user management --- pages/edit_user.ecpp | 176 +++++++++++++++++++++++++++++++++++++++++++++ pages/users.ecpp | 80 +++++++++++++++++++++ users.cpp | 200 +++++++++++++++++++++++++++++++++++++++++++++++++++ users.h | 69 ++++++++++++++++++ 4 files changed, 525 insertions(+) create mode 100644 pages/edit_user.ecpp create mode 100644 pages/users.ecpp create mode 100644 users.cpp create mode 100644 users.h diff --git a/pages/edit_user.ecpp b/pages/edit_user.ecpp new file mode 100644 index 0000000..2ae510a --- /dev/null +++ b/pages/edit_user.ecpp @@ -0,0 +1,176 @@ +<%pre> +#include "exception.h" +#include "tools.h" +#include "users.h" +#include "livefeatures.h" +#include "setup.h" + +using namespace std; +using namespace vdrlive; + + +<%args> + // input parameters + string userid; + // form parameters + string username; + string password; + bool ur_editsetup = false; + bool ur_addtimers = false; + bool ur_deltimers = false; + bool ur_delrecs = false; + bool ur_useremote = false; + bool ur_startreplay = false; + bool ur_switchchnl = false; + bool ur_addstimers = false; + bool ur_delstimers = false; + +<%session scope="global"> +bool logged_in(false); + +<%request scope="page"> +cUser* editUser; + +<%include>page_init.eh +<%cpp> + if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); + +#define CHECKIF(x) reply.out() << ( (x) ? "checked=\"checked\"" : "" ); + + editUser = NULL; + + if (request.getMethod() == "POST") { + if (!userid.empty()) { + editUser = Users.GetByUserId( userid ); + if ( editUser == 0 ) + throw HtmlError( tr("Couldn't find user. Maybe you mistyped your request?") ); + editUser->SetName(username); + if (password != std::string(editUser->GetPasswordLength(), '*')) + editUser->SetPassword(password); + } + else + { + if (Users.GetByUserName( username )) + throw HtmlError( tr("This user name is already in use!") ); + editUser = new cUser(Users.GetNewId(), username, password); + Users.Add(editUser); + } + editUser->SetUserrights(0); + if (ur_editsetup) editUser->SetRight(UR_EDITSETUP); + if (ur_addtimers) editUser->SetRight(UR_EDITTIMERS); + if (ur_deltimers) editUser->SetRight(UR_DELTIMERS); + if (ur_delrecs) editUser->SetRight(UR_DELRECS); + if (ur_useremote) editUser->SetRight(UR_USEREMOTE); + if (ur_startreplay) editUser->SetRight(UR_STARTREPLAY); + if (ur_switchchnl) editUser->SetRight(UR_SWITCHCHNL); + if (ur_addstimers) editUser->SetRight(UR_EDITSTIMERS); + if (ur_delstimers) editUser->SetRight(UR_DELSTIMERS); + + Users.Save(); + + return reply.redirect("users.html"); + } + + pageTitle = !userid.empty() ? tr("Edit user") : tr("New user"); + + if ( !userid.empty() ) { + cUser* User = Users.GetByUserId( userid ); + if ( User == 0 ) + throw HtmlError( tr("Couldn't find user. Maybe you mistyped your request?") ); + + username = User->Name(); + password = std::string(User->GetPasswordLength(), '*'); + ur_editsetup = User->HasRightTo(UR_EDITSETUP); + ur_addtimers = User->HasRightTo(UR_EDITTIMERS); + ur_deltimers = User->HasRightTo(UR_DELTIMERS); + ur_delrecs = User->HasRightTo(UR_DELRECS); + ur_useremote = User->HasRightTo(UR_USEREMOTE); + ur_startreplay = User->HasRightTo(UR_STARTREPLAY); + ur_switchchnl = User->HasRightTo(UR_SWITCHCHNL); + ur_addstimers = User->HasRightTo(UR_EDITSTIMERS); + ur_delstimers = User->HasRightTo(UR_DELSTIMERS); + editUser = User; + } + else + { + ur_editsetup = true; + ur_addtimers = true; + ur_deltimers = true; + ur_delrecs = true; + ur_useremote = true; + ur_startreplay = true; + ur_switchchnl = true; + ur_addstimers = true; + ur_delstimers = true; + } + +<& pageelems.doc_type &> + + + VDR Live - <$ pageTitle $> + <& pageelems.stylesheets &> + <& pageelems.ajax_js &> + + + <& pageelems.logo &> + <& menu active=("users") &> +
+
+ + + + + + + + + + + + + + + + + + + + + + +
<$ pageTitle $>
<$ tr("Name" ) $>:
<$ tr("Password" ) $>:
<$ tr("User rights") $>:
+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+<%cpp> + if (LiveFeatures< features::epgsearch >().Recent()) { + + /> +
+ /> +
+<%cpp> + } + +
+
+ + +
+
+
+
+ + +<%include>page_exit.eh diff --git a/pages/users.ecpp b/pages/users.ecpp new file mode 100644 index 0000000..f884e91 --- /dev/null +++ b/pages/users.ecpp @@ -0,0 +1,80 @@ +<%pre> +#include +#include +#include "users.h" +#include "setup.h" + +using namespace vdrlive; +using namespace std; + + +<%args> + // input parameters + string userid; + string action; + +<%session scope="global"> +bool logged_in(false); + +<%include>page_init.eh +<%cpp> +if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); + +<%cpp> + pageTitle = tr("Users"); + if ( !userid.empty() ) { + if (action == "delete") + { + Users.Del(Users.GetByUserId( userid )); + Users.Save(); + } + } + +<& pageelems.doc_type &> + + + VDR-Live - <$ pageTitle $> + <& pageelems.stylesheets &> + <& pageelems.ajax_js &> + + + <& pageelems.logo &> + <& menu active=("users") component=("users.user_actions")> +
+ + + + + + + +<%cpp> + cUser* user = Users.First(); + while (user) + { + bool bottom = (Users.Next(user) == NULL); + if (user) + { + + + + + + +<%cpp> + } + user = Users.Next(user); + } + +
+
<$ pageTitle $>
+
<$ tr("Name") $>
+
">
<$ user->Name() $>
">" alt="" <& tooltip.hint text=(tr("Edit user")) &>>">" alt="" <& tooltip.hint text=(tr("Delete user")) &>>
+
+ + +<%include>page_exit.eh + +<%def user_actions> +<$ tr("New user") $> + diff --git a/users.cpp b/users.cpp new file mode 100644 index 0000000..d68ec1c --- /dev/null +++ b/users.cpp @@ -0,0 +1,200 @@ +/* + * users.cpp: A plugin for the Video Disk Recorder + * + * See the README file for copyright information and how to reach the author. + * + * $Id: users.cpp,v 1.0 2009/08/27 13:00:00 winni Exp $ + */ + +#include "users.h" +#include +#include +#include "tools.h" +#include "setup.h" + +namespace vdrlive { + +using namespace std; + +std::string cUsers::logged_in_user; + +// -- cUser ----------------------------------------------------------------- +cUser::cUser(int ID, const std::string& Name, const std::string& Password) + : m_ID(ID), m_Name(Name) +{ + SetPassword(Password); +} + +void cUser::SetPassword(const std::string Password) +{ + ostringstream passwordStr; + passwordStr << Password.size() << "|" << MD5Hash(Password); + m_PasswordMD5 = passwordStr.str(); +} + +int cUser::GetPasswordLength() const +{ + // format is : + vector< string > parts = StringSplit( m_PasswordMD5, '|' ); + return (parts.size() > 0) ? lexical_cast< int >( parts[0] ) : 0; +} + +std::string const cUser::GetMD5HashPassword() const +{ + // format is : + vector< string > parts = StringSplit( m_PasswordMD5, '|' ); + return (parts.size() > 1) ? parts[1] : ""; +} + +bool cUser::Parse(const char *s) +{ + char *line; + char *pos; + char *pos_next; + int parameter = 1; + int valuelen; +#define MAXVALUELEN (10 * MaxFileName) + + char value[MAXVALUELEN]; + + pos = line = strdup(s); + pos_next = pos + strlen(pos); + if (*pos_next == '\n') *pos_next = 0; + while (*pos) { + while (*pos == ' ') pos++; + if (*pos) { + if (*pos != ':') { + pos_next = strchr(pos, ':'); + if (!pos_next) + pos_next = pos + strlen(pos); + valuelen = pos_next - pos + 1; + if (valuelen > MAXVALUELEN) + { + esyslog("entry '%s' is too long. Will be truncated!", pos); + valuelen = MAXVALUELEN; + } + strn0cpy(value, pos, valuelen); + pos = pos_next; + + switch (parameter) { + case 1: m_ID = lexical_cast< int >(value); + break; + case 2: m_Name = value; + break; + case 3: m_PasswordMD5 = value; + break; + case 4: + m_Userrights = lexical_cast< int >(value); + break; + default: + break; + } //switch + } + parameter++; + } + if (*pos) pos++; + } //while + + free(line); + return (parameter >= 4) ? true : false; +} + +const char *cUser::ToText(void) +{ + char* buffer = NULL; + asprintf(&buffer, "%d:%s:%s:%d", m_ID, m_Name.c_str(), m_PasswordMD5.c_str(), m_Userrights); + return buffer; +} + +bool cUser::Save(FILE *f) +{ + return fprintf(f, "%s\n", ToText()) > 0; +} + +bool cUser::HasRightTo(eUserRights right) +{ + return ((m_Userrights & (1 << (right-1))) != 0); +} + +bool cUser::CurrentUserHasRightTo(eUserRights right) +{ + if (!LiveSetup().UseAuth()) return true; + cUser* user = cUsers::GetByUserName(cUsers::logged_in_user); + return (cUsers::logged_in_user == LiveSetup().GetAdminLogin() || (user && (user->m_Userrights & (1 << (right-1))) != 0)); +} + +void cUser::SetRight(eUserRights right) +{ + isyslog("set right '%d' in '%d'", right, m_Userrights); + m_Userrights |= (1 << (right-1)); + isyslog("now rights are '%d'", m_Userrights); +} + +bool cUsers::Delete(const std::string& Name) +{ + cUser* user = Users.First(); + while (user) + { + if (user->Name() == Name) + { + Users.Del(user); + Users.Save(); + return true; + } + user = Users.Next(user); + } + return false; +} + +cUser* cUsers::GetByUserId(const std::string& Id) +{ + cUser* user = Users.First(); + while (user) + { + if (user->Id() == atoi(Id.c_str())) + return user; + user = Users.Next(user); + } + return NULL; +} + +cUser* cUsers::GetByUserName(const std::string& Name) +{ + cUser* user = Users.First(); + while (user) + { + if (user->Name() == Name) + return user; + user = Users.Next(user); + } + return NULL; +} + +int cUsers::GetNewId() +{ + int iMaxId = -1; + cUser* user = Users.First(); + while (user) + { + if (iMaxId < user->Id()) + iMaxId = user->Id(); + user = Users.Next(user); + } + return iMaxId + 1; +} + +bool cUsers::ValidUserLogin(const std::string& login, const std::string& password) +{ + cUser* user = GetByUserName(login); + if (user && MD5Hash(password) == user->GetMD5HashPassword()) + return true; + return false; +} + +bool cUsers::ValidLogin(const std::string& login, const std::string& password) +{ + return ((login == LiveSetup().GetAdminLogin() && MD5Hash(password) == LiveSetup().GetMD5HashAdminPassword()) || + ValidUserLogin(login, password)); +} + +} diff --git a/users.h b/users.h new file mode 100644 index 0000000..b845352 --- /dev/null +++ b/users.h @@ -0,0 +1,69 @@ +#ifndef VDR_LIVE_USERS_H +#define VDR_LIVE_USERS_H + +#include +#include +#include +#include +#include + +namespace vdrlive { + +enum eUserRights +{ + UR_EDITSETUP=1, + UR_EDITTIMERS, + UR_DELTIMERS, + UR_DELRECS, + UR_USEREMOTE, + UR_STARTREPLAY, + UR_SWITCHCHNL, + UR_EDITSTIMERS, + UR_DELSTIMERS +}; + +// --- cUser -------------------------------------------------------- +class cUser : public cListObject { + int m_ID; + std::string m_Name; + std::string m_PasswordMD5; + int m_Userrights; +public: + cUser() : m_ID(-1), m_Userrights(0) {} + cUser(int ID, const std::string& Name, const std::string& Password); + int Id() const { return m_ID; } + std::string Name() const { return m_Name; } + std::string PasswordMD5() const { return m_PasswordMD5; } + int Userrights() const { return m_Userrights; } + int GetPasswordLength() const; + std::string const GetMD5HashPassword() const; + void SetId(int Id) { m_ID = Id; } + void SetName(const std::string Name) { m_Name = Name; } + void SetPassword(const std::string Password); + void SetUserrights(int Userrights) { m_Userrights = Userrights; } + bool HasRightTo(eUserRights right); + static bool CurrentUserHasRightTo(eUserRights right); + void SetRight(eUserRights right); + bool Parse(const char *s); + const char *ToText(void); + bool Save(FILE *f); +}; + +// --- cUsers -------------------------------------------------------- +class cUsers : public cConfig { + public: + bool ValidUserLogin(const std::string& login, const std::string& password); + bool ValidLogin(const std::string& login, const std::string& password); + bool Delete(const std::string& Name); + static cUser* GetByUserId(const std::string& Id); + static cUser* GetByUserName(const std::string& Name); + int GetNewId(); + + static std::string logged_in_user; +}; + +extern cUsers Users; + +} + +#endif -- cgit v1.2.3