diff --git a/Dockerfile b/Dockerfile index d10e6b6d9f2959656ef28b31725130885b11e559..bf9559fb745fe92fed0591cbe2b404f624464a9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ARG GOOGLE_INTEGRATION_VERSION="1.0.8" ARG LDAP_WRITE_SUPPORT_VERSION="1.4.0" ARG OIDC_LOGIN_VERSION="2.3.3" -RUN sed -i 's/23,0,9,1/23,0,9,11/' ${BASE_DIR}/version.php +RUN sed -i 's/23,0,9,1/23,0,9,12/' ${BASE_DIR}/version.php COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images @@ -134,6 +134,7 @@ RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/apps/dav/lib/CalDAV/Schedule/IMipPlug RUN patch -u ${BASE_DIR}/core/templates/layout.guest.php -i ${TMP_PATCH_DIR}/016-login-screen.patch RUN patch -u ${BASE_DIR}/core/Command/User/Setting.php -i ${TMP_PATCH_DIR}/018-occ-user-setting.patch RUN patch -u ${BASE_DIR}/apps/settings/lib/Sections/Personal/Groupware.php -i ${TMP_PATCH_DIR}/019-groupware.patch +RUN patch -u ${BASE_DIR}/lib/private/Notification/Manager.php -i ${TMP_PATCH_DIR}/020-fairuse-notification-fix.patch RUN rm -rf ${TMP_PATCH_DIR} # show reset pwd page with a query param diff --git a/patches/020-fairuse-notification-fix.patch b/patches/020-fairuse-notification-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..84dab625659c9ffe96bdb8d130522c5497416df1 --- /dev/null +++ b/patches/020-fairuse-notification-fix.patch @@ -0,0 +1,25 @@ +--- lib/private/Notification/Manager.php 2022-09-06 21:39:49.735827300 +0530 ++++ lib/private/Notification/Manager-new.php 2022-10-06 15:44:38.874640100 +0530 +@@ -303,21 +303,7 @@ + * {@inheritDoc} + */ + public function isFairUseOfFreePushService(): bool { +- $pushAllowed = $this->cache->get('push_fair_use'); +- if ($pushAllowed === null) { +- /** +- * We want to keep offering our push notification service for free, but large +- * users overload our infrastructure. For this reason we have to rate-limit the +- * use of push notifications. If you need this feature, consider using Nextcloud Enterprise. +- */ +- // TODO Remove time check after 1st March 2022 +- $isFairUse = $this->timeFactory->getTime() < 1646089200 +- || $this->subscription->delegateHasValidSubscription() +- || $this->userManager->countSeenUsers() < 5000; +- $pushAllowed = $isFairUse ? 'yes' : 'no'; +- $this->cache->set('push_fair_use', $pushAllowed, 3600); +- } +- return $pushAllowed === 'yes'; ++ return true; + } + + /**