From 94af2134f643b14c7f1a4838e88f7d6ed36aebcc Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 9 Nov 2018 16:58:25 +0000 Subject: [PATCH] Disabled bot protection check for logged in site admin. --- WEB-INF/lib/ttRegistrator.class.php | 9 ++++++--- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/WEB-INF/lib/ttRegistrator.class.php b/WEB-INF/lib/ttRegistrator.class.php index b3551dad..44841f50 100644 --- a/WEB-INF/lib/ttRegistrator.class.php +++ b/WEB-INF/lib/ttRegistrator.class.php @@ -84,11 +84,14 @@ class ttRegistrator { if ($this->err->yes()) return false; // There are errors, do not proceed. global $i18n; + global $user; // Protection fom too many recent bot registrations from user IP. - if ($this->registeredRecently()) { - $this->err->add($i18n->get('error.access_denied')); - return false; + if (!$user->can('administer_site')) { // No problems for site admin. + if ($this->registeredRecently()) { + $this->err->add($i18n->get('error.access_denied')); + return false; + } } import('ttUserHelper'); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index bb6e438b..848425e0 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.12.4395 | Copyright © Anuko | +  Anuko Time Tracker 1.18.12.4396 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1