diff --git a/apps/sharing/tests/CapabilitiesTest.php b/apps/sharing/tests/CapabilitiesTest.php index d1681cab9668d..24854c202257e 100644 --- a/apps/sharing/tests/CapabilitiesTest.php +++ b/apps/sharing/tests/CapabilitiesTest.php @@ -11,12 +11,14 @@ use OCA\Sharing\Capabilities; use OCP\Server; use OCP\Sharing\ISharingRegistry; +use PHPUnit\Framework\Attributes\Group; use Test\Sharing\TestSharePermissionPreset1; use Test\Sharing\TestSharePermissionPreset2; use Test\Sharing\TestShareSourceType1; use Test\Sharing\TestShareSourceType2; use Test\TestCase; +#[Group(name: 'DB')] final class CapabilitiesTest extends TestCase { private ISharingRegistry $registry; diff --git a/lib/private/Sharing/SharingRegistry.php b/lib/private/Sharing/SharingRegistry.php index 3ee949fb1ddfa..333beb3b2b2f6 100644 --- a/lib/private/Sharing/SharingRegistry.php +++ b/lib/private/Sharing/SharingRegistry.php @@ -175,10 +175,6 @@ public function getPropertyTypeCompatibleRecipientTypes(): array { public function registerPropertyType(ISharePropertyType $propertyType): void { $class = $propertyType::class; - if ($propertyType->isRequired() && $propertyType->getDefaultValue() === null) { - throw new RuntimeException('Share property type ' . $class . ' is required, but has no default value.'); - } - if (isset($this->propertyTypes[$class])) { throw new RuntimeException('Share property type ' . $class . ' is already registered'); }