Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 6f87ab7e authored by Akhil's avatar Akhil 🙂
Browse files

Fix merge conflict

parents 5384c4be 35d536af
Loading
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
FROM nextcloud:23.0.11-fpm AS nextcloud
FROM nextcloud:24.0.7-fpm AS nextcloud
ARG BASE_DIR="/usr/src/nextcloud"
ARG TMP_PATCH_DIR="/tmp/build_patches"
ARG THEME_HELPER_JOB_ID="433795"
@@ -8,14 +8,15 @@ ARG NOTES_VERSION="4.5.1"
ARG CONTACTS_JOB_ID="400045"
ARG CALENDAR_JOB_ID="435164"
ARG USER_BACKEND_RAW_SQL_VERSION="1.3.0"
ARG EMAIL_RECOVERY_JOB_ID="433031"
ARG EMAIL_RECOVERY_JOB_ID="445958"
ARG RAINLOOP_VERSION="7.2.5"
ARG RAINLOOP_COMMIT_SHA="523518ba"
ARG EA_JOB_ID="433303"
ARG ECLOUD_LAUNCHER_JOB_ID="432959"
ARG EA_JOB_ID="445966"
ARG ECLOUD_LAUNCHER_JOB_ID="445974"
ARG GOOGLE_INTEGRATION_VERSION="1.0.8"

RUN sed -i 's/23,0,11,1/23,0,11,12/' ${BASE_DIR}/version.php

RUN sed -i 's/24,0,7,1/24,0,7,8/' ${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
@@ -124,6 +125,7 @@ RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/apps/dav/lib/CalDAV/Schedule/IMipPlug
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}/apps/files/js/files.js -i ${TMP_PATCH_DIR}/021-repeated-storage-dialog-fix.patch
RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/3rdparty/sabre/vobject/lib/ITip/Broker.php -i ${TMP_PATCH_DIR}/022-significantchange.patch
RUN rm -rf ${TMP_PATCH_DIR}

# Custom theme
@@ -148,9 +150,9 @@ RUN sed -i 's/update/error/g' ${BASE_DIR}/apps/dav/templates/schedule-response-e
From selfhost as ecloud
ARG BASE_DIR="/usr/src/nextcloud"
ARG TMP_PATCH_DIR="/tmp/build_patches"
ARG THEME_VERSION="23.0.3"
ARG LDAP_WRITE_SUPPORT_VERSION="1.4.0"
ARG OIDC_LOGIN_VERSION="2.3.3"
ARG THEME_VERSION="24.0.0"
ARG LDAP_WRITE_SUPPORT_VERSION="1.6.0"
ARG OIDC_LOGIN_VERSION="2.4.0"

# Patches
COPY patches/ ${TMP_PATCH_DIR}/
@@ -164,7 +166,7 @@ RUN patch -u ${BASE_DIR}/lib/private/Notification/Manager.php -i ${TMP_PATCH_DIR
RUN rm -rf ${TMP_PATCH_DIR}

RUN curl -fsSL -o ldap_write_support.tar.gz \
    "https://github.com/nextcloud-releases/ldap_write_support/releases/download/v${LDAP_WRITE_SUPPORT_VERSION}/ldap_write_support.tar.gz" && \
    "https://github.com/nextcloud-releases/ldap_write_support/releases/download/v${LDAP_WRITE_SUPPORT_VERSION}/ldap_write_support-v${LDAP_WRITE_SUPPORT_VERSION}.tar.gz" && \
    tar -xf ldap_write_support.tar.gz -C ${BASE_DIR}/custom_apps && \
    rm ldap_write_support.tar.gz

@@ -177,13 +179,13 @@ RUN curl -fsSL -o oidc_login.tar.gz \
RUN sed -i 's/https:\/\/nextcloud.com\/signup\//https:\/\/e\.foundation\/<?php p(\$_\[\x27language\x27\]); ?>\/e-email-invite\//' ${BASE_DIR}/core/templates/layout.public.php

# show reset pwd page with a query param
RUN cd ${BASE_DIR}/core/js/dist && sed -i 's/resetPassword:!1/resetPassword:!1||Z.showResetPassword==="1"/' login.js
RUN cd ${BASE_DIR}/dist && sed -i 's/resetPassword:!1/resetPassword:!1||Z.showResetPassword==="1"/' core-login.js

# hide oidc login button
RUN sed -i 's/$context->registerAlternativeLogin(OIDCLoginOption::class);/\/\/$context->registerAlternativeLogin(OIDCLoginOption::class);/' ${BASE_DIR}/custom_apps/oidc_login/lib/AppInfo/Application.php

# sed version of ldap_write_support
RUN cd ${BASE_DIR}/custom_apps/ldap_write_support && sed -i 's/max-version="22"/max-version="23"/' appinfo/info.xml
# change notifications icon src
RUN sed -i 's/(0,zd.imagePath)("notifications",e)/"\/themes\/"+OC.theme.folder+"\/apps\/notifications\/img\/"+e+".svg"/' ${BASE_DIR}/apps/notifications/js/notifications-main.js

# autocomplete leak tweak apps frontend with sed, disable group suggestion

+14 −10
Original line number Diff line number Diff line
@@ -12,23 +12,26 @@ this filtering works in conjunction with the autocomplete feature disabled in ne


diff --git lib/private/Collaboration/Collaborators/UserPlugin.php lib/private/Collaboration/Collaborators/UserPlugin-new.php
--- lib/private/Collaboration/Collaborators/UserPlugin.php	2021-01-25 15:56:05.000000000 +0100
+++ lib/private/Collaboration/Collaborators/UserPlugin-new.php	2021-02-16 14:56:26.778152834 +0100
@@ -186,8 +186,8 @@
--- lib/private/Collaboration/Collaborators/UserPlugin.php	2022-11-23 17:19:20.220495300 +0530
+++ lib/private/Collaboration/Collaborators/UserPlugin-new.php	2022-11-23 17:19:05.690495300 +0530
@@ -186,9 +186,9 @@
 			if (
 				$this->shareeEnumerationFullMatch &&
 				$lowerSearch !== '' && (strtolower($uid) === $lowerSearch ||
-				strtolower($userDisplayName) === $lowerSearch ||
-				($this->shareeEnumerationFullMatchIgnoreSecondDisplayName && trim(strtolower(preg_replace('/ \(.*\)$/', '', $userDisplayName))) === $lowerSearch) ||
-				($this->shareeEnumerationFullMatchEmail && strtolower($userEmail ?? '') === $lowerSearch))
+				// strtolower($userDisplayName) === $lowerSearch ||
+				// ($this->shareeEnumerationFullMatchIgnoreSecondDisplayName && trim(strtolower(preg_replace('/ \(.*\)$/', '', $userDisplayName))) === $lowerSearch) ||
 				($this->shareeEnumerationFullMatchEmail && strtolower($userEmail) === $lowerSearch))
+				($this->shareeEnumerationFullMatchEmail && strtolower($userEmail) === $lowerSearch))
 			) {
 				if (strtolower($uid) === $lowerSearch) {
 					$foundUserById = true;

diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Collaboration/Collaborators/MailPlugin-new.php
--- lib/private/Collaboration/Collaborators/MailPlugin.php	2021-06-22 14:53:24.451402977 +0530
+++ lib/private/Collaboration/Collaborators/MailPlugin-new.php	2021-06-22 14:56:31.201379020 +0530
@@ -37,6 +37,7 @@
--- lib/private/Collaboration/Collaborators/MailPlugin.php	2022-11-23 15:20:44.460495300 +0530
+++ lib/private/Collaboration/Collaborators/MailPlugin-new.php	2022-11-23 16:55:17.540495300 +0530
@@ -36,6 +36,7 @@
 use OCP\IConfig;
 use OCP\IGroupManager;
 use OCP\IUser;
@@ -36,7 +39,7 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co
 use OCP\IUserSession;
 use OCP\Share\IShare;
 use OCP\Mail\IMailer;
@@ -75,13 +76,15 @@
@@ -76,13 +77,15 @@
 								IGroupManager $groupManager,
 								KnownUserService $knownUserService,
 								IUserSession $userSession,
@@ -53,7 +56,7 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co
 		$this->mailer = $mailer;

 		$this->shareeEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes';
@@ -218,27 +221,62 @@
@@ -224,27 +227,63 @@
 						if ($exactEmailMatch) {
 							$searchResult->markExactIdMatch($emailType);
 						}
@@ -67,6 +70,7 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co
-								'shareWith' => $emailAddress,
-							],
-						];
+
+						$isUserinInstance = $this->userManager->get($emailAddress);
+						if ($isUserinInstance === null) {
+    					// /e/ user is not in ecloud
+16 −15
Original line number Diff line number Diff line
--- lib/private/legacy/OC_Helper.php	2022-05-17 19:34:56.340385500 +0530
+++ lib/private/legacy/OC_Helper_new.php	2022-05-17 21:19:30.060385500 +0530
@@ -532,6 +532,12 @@
 			$quota = $sourceStorage->getQuota();
--- lib/private/legacy/OC_Helper.php	2022-11-23 19:35:50.880495300 +0530
+++ lib/private/legacy/OC_Helper-new.php	2022-11-23 19:40:09.970495300 +0530
@@ -543,6 +543,12 @@
 		}
 		$free = $sourceStorage->free_space($internalPath);
 		try {
 			$free = $sourceStorage->free_space($rootInfo->getInternalPath());
+			$ownerId = $storage->getOwner($path);
+			$mailQuotaUsage = (int) \OC::$server->getConfig()->getUserValue($ownerId, 'ecloud-accounts', 'mailQuotaUsage', 0);
+			$free = max(0,$free - $mailQuotaUsage);
+			if($path === '/') {
+					$used = $used + $mailQuotaUsage;
+			}
 		if ($free >= 0) {
 			$total = $free + $used;
 		} else {
@@ -547,7 +553,6 @@
 		} catch (\Exception $e) {
 			if ($path === "") {
 				throw $e;
@@ -569,7 +575,7 @@
 			$relative = 0;
 		}

-		$ownerId = $storage->getOwner($path);
+
 		$ownerDisplayName = '';
 		$owner = \OC::$server->getUserManager()->get($ownerId);
 		if ($owner) {
+25 −11
Original line number Diff line number Diff line
@@ -4,9 +4,23 @@ Subject: [PATCH] To implement custom email template design for calendar invite

This patch is allowing to customize the email template design for invitation

--- ./apps/dav/lib/CalDAV/Schedule/IMipPlugin.php	2022-11-10 10:39:19.134653000 +0530
+++ ./apps/dav/lib/CalDAV/Schedule/iMipPluginNew.php	2022-11-11 12:28:15.829119700 +0530
@@ -252,7 +252,21 @@
--- apps/dav-4/lib/CalDAV/Schedule/IMipPlugin.php	2022-11-10 10:39:19.134653000 +0530
+++ apps/dav-4/lib/CalDAV/Schedule/iMipPluginNew.php	2022-11-25 15:05:11.443768000 +0530
@@ -237,6 +237,13 @@
 		];

 		$fromEMail = Util::getDefaultEmailAddress('invitations-noreply');
+		//if sender name is empty sometimes in case of email client
+		if ($senderName === null || empty(trim($senderName))) {
+			$users = $this->userManager->getByEmail($sender);
+			if (count($users) === 1) {
+				$senderName = $users[0]->getDisplayName();
+			}
+		}
 		$fromName = $l10n->t('%1$s via %2$s', [$senderName, $this->defaults->getName()]);

 		$message = $this->mailer->createMessage()
@@ -252,7 +259,21 @@

 		$summary = ((string) $summary !== '') ? (string) $summary : $l10n->t('Untitled event');

@@ -29,7 +43,7 @@ This patch is allowing to customize the email template design for invitation
 		$this->addBulletList($template, $l10n, $vevent);

 		// Only add response buttons to invitation requests: Fix Issue #11230
@@ -516,6 +530,7 @@
@@ -516,6 +537,7 @@
 		return $dtStart->format('Y-m-d') === $dtEnd->format('Y-m-d');
 	}

@@ -37,7 +51,7 @@ This patch is allowing to customize the email template design for invitation
 	/**
 	 * @param IEMailTemplate $template
 	 * @param IL10N $l10n
@@ -542,24 +557,86 @@
@@ -542,24 +564,86 @@
 	/**
 	 * @param IEMailTemplate $template
 	 * @param IL10N $l10n
@@ -79,8 +93,7 @@ This patch is allowing to customize the email template design for invitation
+				$lastmodified=$dtstampTime;
+				$selectedEvent = $currentevent;
+			}
 		}
-		$meetingWhen = $this->generateWhenString($l10n, $vevent);
+		}
+		if ($selectedEvent->SUMMARY) {
+			if (trim($selectedEvent->SUMMARY) == trim($parentevent->SUMMARY)) {
+				$template->addBodyListItem($selectedEvent->SUMMARY, $l10n->t('Title:'),
@@ -89,7 +102,8 @@ This patch is allowing to customize the email template design for invitation
+				$template->addBodyListItemModified($selectedEvent->SUMMARY, $l10n->t('Updated Title:'),
+					$this->getAbsoluteImagePath('caldav/title.png'),'','',self::IMIP_INDENT);
+			}
+		}
 		}
-		$meetingWhen = $this->generateWhenString($l10n, $vevent);
+		$meetingWhen = $this->generateWhenString($l10n, $selectedEvent);
 		if ($meetingWhen) {
-			$template->addBodyListItem($meetingWhen, $l10n->t('Time:'),
@@ -135,7 +149,7 @@ This patch is allowing to customize the email template design for invitation
 			$template->addBodyListItem(sprintf('<a href="%s">%s</a>',
 					htmlspecialchars($url),
 					htmlspecialchars($url)),
@@ -567,13 +644,16 @@
@@ -567,13 +651,16 @@
 				$this->getAbsoluteImagePath('caldav/link.png'),
 				$url,'',self::IMIP_INDENT);
 		}
@@ -158,7 +172,7 @@ This patch is allowing to customize the email template design for invitation
 		}
 	}

@@ -662,7 +742,7 @@
@@ -662,7 +749,7 @@
 										Message $iTipMessage, $lastOccurrence) {
 		$token = $this->createInvitationToken($iTipMessage, $lastOccurrence);

@@ -167,7 +181,7 @@ This patch is allowing to customize the email template design for invitation
 			$l10n->t('Accept'),
 			$this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.accept', [
 				'token' => $token,
@@ -670,18 +750,10 @@
@@ -670,18 +757,10 @@
 			$l10n->t('Decline'),
 			$this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.decline', [
 				'token' => $token,
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
 		<link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('', 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
 		<link rel="manifest" href="<?php print_unescaped(image_path('', 'manifest.json')); ?>">
 		<?php emit_css_loading_tags($_); ?>
+		<?php array_push($_['jsfiles'] , '/themes/eCloud/core/js/login.js') ?>
+		<?php array_push($_['jsfiles'] , '/themes/eCloud/core/js/custom-login.js') ?>
 		<?php emit_script_loading_tags($_); ?>
 		<?php print_unescaped($_['headers']); ?>
 	</head>
Loading