Skip to content

Commit d0a1005

Browse files
committed
fix(Sharing): Remove faulty check if required properties have a default value
Signed-off-by: provokateurin <kate@provokateurin.de>
1 parent c71fada commit d0a1005

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

apps/sharing/tests/CapabilitiesTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
use OCA\Sharing\Capabilities;
1212
use OCP\Server;
1313
use OCP\Sharing\ISharingRegistry;
14+
use PHPUnit\Framework\Attributes\Group;
1415
use Test\Sharing\TestSharePermissionPreset1;
1516
use Test\Sharing\TestSharePermissionPreset2;
1617
use Test\Sharing\TestShareSourceType1;
1718
use Test\Sharing\TestShareSourceType2;
1819
use Test\TestCase;
1920

21+
#[Group(name: 'DB')]
2022
final class CapabilitiesTest extends TestCase {
2123
private ISharingRegistry $registry;
2224

lib/private/Sharing/SharingRegistry.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,6 @@ public function getPropertyTypeCompatibleRecipientTypes(): array {
175175
public function registerPropertyType(ISharePropertyType $propertyType): void {
176176
$class = $propertyType::class;
177177

178-
if ($propertyType->isRequired() && $propertyType->getDefaultValue() === null) {
179-
throw new RuntimeException('Share property type ' . $class . ' is required, but has no default value.');
180-
}
181-
182178
if (isset($this->propertyTypes[$class])) {
183179
throw new RuntimeException('Share property type ' . $class . ' is already registered');
184180
}

0 commit comments

Comments
 (0)