Skip to content

Commit 9add8c9

Browse files
committed
Merge branch 'feature/PB-39559_v4_12_13-Prepare-API-code' into 'release'
Feature/pb 39559 v4 12 13 prepare api code See merge request passbolt/passbolt-ce-api!342
2 parents 76ae59d + e46aac8 commit 9add8c9

File tree

8 files changed

+53
-17
lines changed

8 files changed

+53
-17
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [4.12.0-rc.1] - 2025-03-06
6+
### Added
7+
- PB-39395 As an administrator I can contain permissions when upgrading folders to v5 format
8+
- PB-39394 As an administrator I can contain permissions when upgrading resources to v5 format
9+
- PB-38850 As an administrator I cannot rotate entities while two metadata keys are active
10+
- PB-37699 As an administrator I can upgrade folders to v5 format
11+
- PB-37363 As an administrator I can rotate metadata keys encrypting folders metadata
12+
- PB-36582 As an administrator I cannot reuse a previously deleted metadata key
13+
14+
### Fixed
15+
- PB-39512 Fix during metadata upgrade process, the resource_type_id field is now updated in the database
16+
- PB-39399 Adds missing fields to metadata private keys in index response
17+
- PB-39393 Fix limit value is null in pagination header response for rotate & upgrade endpoints
18+
- PB-38770 Fix email subject for delete resource email when resource is v
19+
- PB-38791 Fix 500 error on the duo MFA setup & verify page when duo service is unavailable
20+
- PB-38771 Fix unable to expire the metadata key due to expired datetime format
21+
22+
### Maintenance
23+
- PB-39629 Set next minimum PHP version to 8.2 as passbolt v5 will not support lower PHP versions
24+
525
## [4.12.0-test.1] - 2025-03-05
626
### Added
727
- PB-39395 As an administrator I can contain permissions when upgrading folders to v5 format

RELEASE_NOTES.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
Release song: TBD
1+
Release song: https://www.youtube.com/watch?v=pBZs_Py-1_0
22

3-
## [4.12.0-test.1] - 2025-03-05
3+
Passbolt v4.12.0 introduces 2 new administration pages to manage the migration of metadata and the allowed content, laying groundwork for the upcoming v5 release and its new resource format. This beta feature eases admins, developers and integrators to explore and adapt their systems ahead of the transition.
4+
5+
This release also resolves an ergonomical issue where the multi-selection keyboard shortcuts are now adapted to the OS standard shortcuts.
6+
A few fixes come with this release as well. Exporting resources now sets all the data properly and creation and edition of a resource sets all the metadata fields as expected, allowing integration to fully validate the metadata.
7+
8+
Thank you to the community for your feedback and support.
9+
10+
## [4.12.0-rc.1] - 2025-03-06
411
### Added
512
- PB-39395 As an administrator I can contain permissions when upgrading folders to v5 format
613
- PB-39394 As an administrator I can contain permissions when upgrading resources to v5 format
@@ -16,3 +23,6 @@ Release song: TBD
1623
- PB-38770 Fix email subject for delete resource email when resource is v
1724
- PB-38791 Fix 500 error on the duo MFA setup & verify page when duo service is unavailable
1825
- PB-38771 Fix unable to expire the metadata key due to expired datetime format
26+
27+
### Maintenance
28+
- PB-39629 Set next minimum PHP version to 8.2 as passbolt v5 will not support lower PHP versions

config/version.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
return [
33
'passbolt' => [
4-
'version' => '4.12.0-test.1',
5-
'name' => 'TBD',
4+
'version' => '4.12.0-rc.1',
5+
'name' => 'Rusty Cage',
66
],
77
'php' => [
88
'minVersion' => '7.4',
9-
'nextMinVersion' => '8.1',
9+
'nextMinVersion' => '8.2',
1010
],
1111
];

plugins/PassboltCe/Metadata/tests/TestCase/Controller/Resources/MetadataResourcesDeleteControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ public function testMetadataResourcesDeleteController_Success(): void
7070
$this->assertSuccess();
7171
$this->assertEmailQueueCount(1);
7272
$this->assertEmailSubject($user->username, sprintf('%s deleted a password', Purifier::clean($owner->profile->first_name)));
73-
$this->assertEmailInBatchContains(sprintf('%s deleted a password', Purifier::clean($owner->profile->full_name)), $user->username);
73+
$this->assertEmailInBatchContains(sprintf('%s deleted a password', $owner->profile->full_name), $user->username);
7474
}
7575
}

plugins/PassboltCe/MultiFactorAuthentication/tests/Lib/MfaIntegrationTestCase.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,18 @@ public function mockSessionId(string $sessionId)
123123
* Mock form to prevent failing verify call due timestamp mismatch.
124124
*
125125
* @param string $className Form class to mock.
126+
* @param \App\Utility\UserAccessControl $uac User access control
126127
* @return void
127128
*/
128-
public function mockTotpMfaForm(string $className): void
129+
public function mockTotpMfaFormInterface(string $className, UserAccessControl $uac): void
129130
{
130-
$form = $this->createMock($className);
131+
$mfaSettingsMock = $this->getMockBuilder(MfaSettings::class)->disableOriginalConstructor()->getMock();
132+
$form = $this->getMockBuilder($className)
133+
->setConstructorArgs([$uac, $mfaSettingsMock])
134+
->onlyMethods(['isValidOtp'])
135+
->getMock();
131136
$form->method('isValidOtp')->willReturn(true);
132-
$this->mockService($className, function () use ($form) {
137+
$this->mockService(MfaFormInterface::class, function () use ($form) {
133138
return $form;
134139
});
135140
}

plugins/PassboltCe/MultiFactorAuthentication/tests/TestCase/Controllers/Totp/TotpSetupPostControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public function testTotpSetupPostController_SuccessSelfGeneratedUriSuccess()
171171
$otp = Factory::loadFromProvisioningUri($uri);
172172
$sessionId = 'some_session_id';
173173
$this->mockSessionId($sessionId);
174-
$this->mockTotpMfaForm(TotpSetupForm::class);
174+
$this->mockTotpMfaFormInterface(TotpSetupForm::class, $this->makeUac($user));
175175

176176
$this->post('/mfa/setup/totp.json?api-version=v2', [
177177
'otpProvisioningUri' => $uri,
@@ -199,7 +199,7 @@ public function testTotpSetupPostController_SuccessSelfGeneratedUriSuccess_JWT_A
199199
$uri = MfaOtpFactory::generateTOTP($this->makeUac($user));
200200
/** @var \OTPHP\TOTPInterface $otp */
201201
$otp = Factory::loadFromProvisioningUri($uri);
202-
$this->mockTotpMfaForm(TotpSetupForm::class);
202+
$this->mockTotpMfaFormInterface(TotpSetupForm::class, $this->makeUac($user));
203203

204204
$this->post('/mfa/setup/totp.json?api-version=v2', [
205205
'otpProvisioningUri' => $uri,

plugins/PassboltCe/MultiFactorAuthentication/tests/TestCase/Controllers/Totp/TotpVerifyPostControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testMfaVerifyPostTotpUriSuccess()
5858
[$uri] = $this->loadFixtureScenario(MfaTotpScenario::class, $user);
5959
/** @var \OTPHP\TOTPInterface $otp */
6060
$otp = Factory::loadFromProvisioningUri($uri);
61-
$this->mockTotpMfaForm(TotpVerifyForm::class);
61+
$this->mockTotpMfaFormInterface(TotpVerifyForm::class, $this->makeUac($user));
6262

6363
$this->post('/mfa/verify/totp?redirect=' . $redirect, [
6464
'totp' => $otp->now(),

tests/TestCase/Controller/Users/UsersIndexControllerPaginationTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,17 @@ public function testUsersIndexController_Success_Pagination(?string $sortedField
8585
$page = 2;
8686
$expectedCurrent = 9;
8787

88+
$data = Hash::merge(
89+
$this->getArrayOfDistinctRandomStrings($numberOfUsers, 'first_name'),
90+
$this->getArrayOfDistinctRandomPastDates($numberOfUsers, 'created')
91+
);
92+
8893
$admin = UserFactory::make()
8994
->admin()
90-
->with('Profiles')
95+
->with('Profiles', array_shift($data))
9196
->withLogIn(3)
9297
->persist();
9398

94-
$data = Hash::merge(
95-
$this->getArrayOfDistinctRandomStrings($numberOfUsers - 1, 'first_name'),
96-
$this->getArrayOfDistinctRandomPastDates($numberOfUsers - 1, 'created')
97-
);
9899
ProfileFactory::make($data)
99100
->with('Users', UserFactory::make()->user()->without('Profiles')->withLogIn(3))
100101
->persist();

0 commit comments

Comments
 (0)