diff --git a/apps/files_sharing/lib/capabilities.php b/apps/files_sharing/lib/capabilities.php
index 913f248b1749d1f5b013abf2ec1914839d83f79d..5ec540ad4e0c36ada94303afffc314fc404ce147 100644
--- a/apps/files_sharing/lib/capabilities.php
+++ b/apps/files_sharing/lib/capabilities.php
@@ -74,6 +74,8 @@ class Capabilities implements ICapability {
 			$res['user']['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_mail_notification', 'no') === 'yes';
 
 			$res['resharing'] = $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes') === 'yes';
+
+			$res['group_sharing'] = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes';
 		}
 
 		//Federated sharing
diff --git a/apps/files_sharing/tests/capabilities.php b/apps/files_sharing/tests/capabilities.php
index 7572f5c84aa8fb4d13a6d1880e42bb879e6eb6dd..0e17811be035f3c78c563c4557ce863370ff1bdb 100644
--- a/apps/files_sharing/tests/capabilities.php
+++ b/apps/files_sharing/tests/capabilities.php
@@ -243,6 +243,24 @@ class FilesSharingCapabilitiesTest extends \Test\TestCase {
 		$this->assertFalse($result['public']['upload']);
 	}
 
+	public function testNoGroupSharing() {
+		$map = [
+			['core', 'shareapi_enabled', 'yes', 'yes'],
+			['core', 'shareapi_allow_group_sharing', 'yes', 'no'],
+		];
+		$result = $this->getResults($map);
+		$this->assertFalse($result['group_sharing']);
+	}
+
+	public function testGroupSharing() {
+		$map = [
+			['core', 'shareapi_enabled', 'yes', 'yes'],
+			['core', 'shareapi_allow_group_sharing', 'yes', 'yes'],
+		];
+		$result = $this->getResults($map);
+		$this->assertTrue($result['group_sharing']);
+	}
+
 	public function testFederatedSharingIncomming() {
 		$map = [
 			['files_sharing', 'incoming_server2server_share_enabled', 'yes', 'yes'],