summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2019-06-24 16:18:50 +0200
committerSimon Rettberg2019-06-24 16:18:50 +0200
commit21053126af053bce2a1d3726f697e432c4f714bf (patch)
tree0523f4821777b7d09b8b50d38bbb582f6d824c24 /src
parentImprove OS icon detection, add Win9x and Win 10 (diff)
downloadvmchooser2-21053126af053bce2a1d3726f697e432c4f714bf.tar.gz
vmchooser2-21053126af053bce2a1d3726f697e432c4f714bf.tar.xz
vmchooser2-21053126af053bce2a1d3726f697e432c4f714bf.zip
Remove client-side date range checking
Diffstat (limited to 'src')
-rw-r--r--src/vsession.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/vsession.cpp b/src/vsession.cpp
index d5cc966..b5e4e49 100644
--- a/src/vsession.cpp
+++ b/src/vsession.cpp
@@ -208,37 +208,6 @@ bool VSession::isActive() const {
if (g_debugMode) qDebug() << "'" << shortDescription() << "' not active. Reason: active == false";
return false;
}
- // Check for date range
- if (value.count("/") == 1) {
- // try to interpret value as date range
- // [YYYY-MM-DD]/[YYYY-MM-DD]
- // eg. "1970-01-01/1971-01-01" from Jan 1st 1970 till Jan 1st 1971
- // "/1971-01-01" till Jan 1st 1971
- // "1970-01-01/" from Jan 1st 1970
- // "/" allways
- // note: invalid dates are treated as empty dates
-
- QStringList list(value.split("/"));
- QString from(list.value(0));
- QString till(list.value(1));
- QDate fromDate(QDate::fromString(from, Qt::ISODate));
- QDate tillDate(QDate::fromString(till, Qt::ISODate));
-
- QDate today(QDate::currentDate());
-
- if (fromDate.isValid() && fromDate > today) {
- // fromDate is in the future
- if (g_debugMode) qDebug() << "'" << shortDescription() << "' not active. Reason: fromDate is in the future";
- return false;
- }
-
- if (tillDate.isValid() && tillDate < today) {
- // tillDate is in the past
- if (g_debugMode) qDebug() << "'" << shortDescription() << "' not active. Reason: tillDate is in the past";
- return false;
- }
- }
-
// Filter by LDAP data
if (!UserLdapData::isEmpty()) {
QDomElement el(eintrag_.namedItem("filters").firstChildElement("filter"));