Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ad54e9c
IONOS(ci): Pin workflow action versions
bromiesTM Jun 3, 2026
f89fe17
IONOS(ci): Pin sbom workflow actions to commit SHAs
bromiesTM Jun 3, 2026
20da11f
IONOS(ci): fix pre-existing action pin issues in hidrive-next-build.yml
printminion-co Jun 5, 2026
72abd53
IONOS(notify_push): add submodule at v1.3.3
bromiesTM Jun 15, 2026
b4865e2
IONOS(ci): Add notify_push app build step to HiDrive Next build workflow
bromiesTM Jun 15, 2026
ca14cf8
refactor(sharebymail): extract createEMailTemplate params into $templ…
printminion-co Jun 15, 2026
eeb3cc5
IONOS(sharebymail): add BeforeShare*MailSentEvent dispatched before e…
printminion-co Jun 15, 2026
f664cd2
IONOS(sharebymail): add Event classes to composer autoload_static cla…
tanyaka Jun 25, 2026
beb7e3d
IONOS(sharebymail): fix ShareByMailProviderTest broken by templateDat…
tanyaka Jun 25, 2026
4069c92
IONOS(sharebymail): add test coverage for BeforeShareNoteMailSentEven…
tanyaka Jun 26, 2026
d112fcd
IONOS(sharebymail): fix createPasswordSendActivity firing when mail i…
tanyaka Jun 30, 2026
878b7ff
IONOS(nc_ionos_processes): update submodule to 9501a5e (send email fo…
printminion-co Jun 15, 2026
96288ad
IONOS(simplesettings): cherry-pick stable30 changes onto ionos-dev-v3…
tanyaka Jul 24, 2026
9e9a523
IONOS(simplesettings): fix NC32 test reset in ionos-dev-v32.0.6
tanyaka Jul 24, 2026
062509e
IONOS(config): update submodule (EU Markets changes)
bromiesTM Jul 27, 2026
ecb394c
IONOS(ci): update to renamed make target for nextcloud build
bromiesTM Jul 27, 2026
2f594dc
IONOS(theming): update submodule
bromiesTM Jul 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/hidrive-next-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ jobs:
run: make --version && node --version && npm --version

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # 2.31.1
with:
php-version: '8.3'
tools: composer:v2
Expand All @@ -633,7 +633,7 @@ jobs:
run: php -i && php -m

- name: Build Nextcloud (core only — apps restored from cache)
run: make -f IONOS/Makefile build_nextcloud_only
run: make -f IONOS/Makefile build_nextcloud

- name: Add config partials
run: make -f IONOS/Makefile add_config_partials
Expand Down Expand Up @@ -664,7 +664,7 @@ jobs:
echo "NC_VERSION=$NC_VERSION" >> $GITHUB_OUTPUT

- name: Upload artifact result for job hidrive-next-build
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
retention-days: 30
name: hidrive_next_build_artifact
Expand Down Expand Up @@ -732,12 +732,12 @@ jobs:
fetch-depth: 1

- name: Download artifact zip
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: hidrive_next_build_artifact

# This action sets up the JFrog CLI with the Artifactory URL and access token
- uses: jfrog/setup-jfrog-cli@v4
- uses: jfrog/setup-jfrog-cli@1641575d87647fb969c0545f0b6a76873e328b7c # v5.0.0
env:
JF_URL: ${{ secrets.JF_ARTIFACTORY_URL }}
JF_USER: ${{ secrets.JF_ARTIFACTORY_USER }}
Expand Down Expand Up @@ -871,7 +871,7 @@ jobs:

steps:
- name: Download artifact zip
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: hidrive_next_build_artifact

Expand Down Expand Up @@ -903,7 +903,7 @@ jobs:
EOF

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
with:
context: .
push: true
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/sbom-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:

steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # 2.31.1
with:
php-version: '8.1'

Expand Down Expand Up @@ -218,13 +218,13 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@v5
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
submodules: true

- name: Setup PHP with PECL extension
if: matrix.component.composer_output
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # 2.31.1
with:
tools: composer:v2
extensions: gd, zip, curl, xml, xmlrpc, mbstring, sqlite, xdebug, pgsql, intl, imagick, gmp, apcu, bcmath, redis, soap, imap, opcache
Expand All @@ -249,7 +249,7 @@ jobs:

- name: Set up Node.js
if: matrix.component.npm_output
uses: actions/setup-node@v4
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: "${{ matrix.component.path }}/package.json"
cache: 'npm'
Expand All @@ -270,7 +270,7 @@ jobs:
ls -la "${parent_dir}/${{ matrix.component.npm_output }}"

- name: Upload component SBOM artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: sbom-${{ matrix.component.name }}
path: |
Expand All @@ -295,7 +295,7 @@ jobs:

steps:
- name: Download all SBOM artifacts
uses: actions/download-artifact@v5
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
pattern: sbom-*
merge-multiple: true
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@
[submodule "IONOS"]
path = IONOS
url = git@github.com:IONOS-Productivity/nc-config.git
[submodule "apps-external/notify_push"]
path = apps-external/notify_push
url = git@github.com:nextcloud/notify_push.git
1 change: 1 addition & 0 deletions apps-external/notify_push
Submodule notify_push added at 20eec4
4 changes: 4 additions & 0 deletions apps/sharebymail/composer/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'OCA\\ShareByMail\\Activity' => $baseDir . '/../lib/Activity.php',
'OCA\\ShareByMail\\Event\\AbstractBeforeShareMailSentEvent' => $baseDir . '/../lib/Event/AbstractBeforeShareMailSentEvent.php',
'OCA\\ShareByMail\\Event\\BeforeShareMailSentEvent' => $baseDir . '/../lib/Event/BeforeShareMailSentEvent.php',
'OCA\\ShareByMail\\Event\\BeforeShareNoteMailSentEvent' => $baseDir . '/../lib/Event/BeforeShareNoteMailSentEvent.php',
'OCA\\ShareByMail\\Event\\BeforeSharePasswordMailSentEvent' => $baseDir . '/../lib/Event/BeforeSharePasswordMailSentEvent.php',
'OCA\\ShareByMail\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
'OCA\\ShareByMail\\Capabilities' => $baseDir . '/../lib/Capabilities.php',
'OCA\\ShareByMail\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php',
Expand Down
4 changes: 4 additions & 0 deletions apps/sharebymail/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class ComposerStaticInitShareByMail
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'OCA\\ShareByMail\\Activity' => __DIR__ . '/..' . '/../lib/Activity.php',
'OCA\\ShareByMail\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
'OCA\\ShareByMail\\Event\\AbstractBeforeShareMailSentEvent' => __DIR__ . '/..' . '/../lib/Event/AbstractBeforeShareMailSentEvent.php',
'OCA\\ShareByMail\\Event\\BeforeShareMailSentEvent' => __DIR__ . '/..' . '/../lib/Event/BeforeShareMailSentEvent.php',
'OCA\\ShareByMail\\Event\\BeforeShareNoteMailSentEvent' => __DIR__ . '/..' . '/../lib/Event/BeforeShareNoteMailSentEvent.php',
'OCA\\ShareByMail\\Event\\BeforeSharePasswordMailSentEvent' => __DIR__ . '/..' . '/../lib/Event/BeforeSharePasswordMailSentEvent.php',
'OCA\\ShareByMail\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php',
'OCA\\ShareByMail\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php',
'OCA\\ShareByMail\\Settings\\SettingsManager' => __DIR__ . '/..' . '/../lib/Settings/SettingsManager.php',
Expand Down
62 changes: 62 additions & 0 deletions apps/sharebymail/lib/Event/AbstractBeforeShareMailSentEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\ShareByMail\Event;

use OCP\EventDispatcher\Event;
use OCP\Mail\IMessage;
use OCP\Share\IShare;

/**
* Base class for all BeforeShare*MailSentEvent types.
*
* Carries the fully-prepared IMessage (already rendered) and the resolved
* recipient list. Listeners call markMailHandled() to suppress the native
* mailer->send().
*/
abstract class AbstractBeforeShareMailSentEvent extends Event {
private bool $mailHandled = false;

/**
* @param string[] $resolvedEmails validated recipients
*/
public function __construct(
private readonly IShare $share,
private readonly array $resolvedEmails,
private readonly IMessage $message,
) {
parent::__construct();
}

public function getShare(): IShare {
return $this->share;
}

/** @return string[] */
public function getResolvedEmails(): array {
return $this->resolvedEmails;
}

public function getMessage(): IMessage {
return $this->message;
}

/**
* Call to suppress the native mailer->send() for this message.
* Must be called before any send attempt — if the listener's own send
* throws, the exception propagates and the native send is also skipped.
*/
public function markMailHandled(): void {
$this->mailHandled = true;
}

public function isMailHandled(): bool {
return $this->mailHandled;
}
}
72 changes: 72 additions & 0 deletions apps/sharebymail/lib/Event/BeforeShareMailSentEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\ShareByMail\Event;

use OCP\Mail\IMessage;
use OCP\Share\IShare;

/**
* Fired by ShareByMailProvider::sendEmail() immediately before the native
* mailer->send() call for share-link notifications to recipients.
*
* @psalm-type TemplateData = array{
* senderUserId: string,
* filename: string,
* link: string,
* initiator: string,
* expiration: \DateTime|null,
* shareWith: string,
* note: string,
* }
*
* @psalm-api
*/
class BeforeShareMailSentEvent extends AbstractBeforeShareMailSentEvent {
/**
* @param string[] $resolvedEmails
* @param TemplateData $templateData
*/
public function __construct(
IShare $share,
array $resolvedEmails,
IMessage $message,
private readonly array $templateData,
) {
parent::__construct($share, $resolvedEmails, $message);
}

public function getSenderUserId(): string {
return $this->templateData['senderUserId'];
}

public function getFileName(): string {
return $this->templateData['filename'];
}

public function getResourceUrl(): string {
return $this->templateData['link'];
}

public function getNote(): string {
return $this->templateData['note'];
}

public function getShareWith(): string {
return $this->templateData['shareWith'];
}

public function getInitiatorDisplayName(): string {
return $this->templateData['initiator'];
}

public function getExpiration(): ?\DateTime {
return $this->templateData['expiration'];
}
}
47 changes: 47 additions & 0 deletions apps/sharebymail/lib/Event/BeforeShareNoteMailSentEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\ShareByMail\Event;

use OCP\Mail\IMessage;
use OCP\Share\IShare;

/**
* Fired by ShareByMailProvider::sendNote() immediately before the native
* mailer->send() call for note-update notifications to recipients.
*
* @psalm-type TemplateData = array{
* filename: string,
* note: string,
* }
*
* @psalm-api
*/
class BeforeShareNoteMailSentEvent extends AbstractBeforeShareMailSentEvent {
/**
* @param string[] $resolvedEmails
* @param TemplateData $templateData
*/
public function __construct(
IShare $share,
array $resolvedEmails,
IMessage $message,
private readonly array $templateData,
) {
parent::__construct($share, $resolvedEmails, $message);
}

public function getFileName(): string {
return $this->templateData['filename'];
}

public function getNote(): string {
return $this->templateData['note'];
}
}
Loading
Loading