Add capability to show if group sharing is enabled
fixes #23477 Now clients can correct wording to properly reflect who a user can share with.
This commit is contained in:
parent
6ecd1d9e86
commit
db5ea95e29
|
@ -74,6 +74,8 @@ class Capabilities implements ICapability {
|
||||||
$res['user']['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_mail_notification', 'no') === 'yes';
|
$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['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
|
//Federated sharing
|
||||||
|
|
|
@ -243,6 +243,24 @@ class FilesSharingCapabilitiesTest extends \Test\TestCase {
|
||||||
$this->assertFalse($result['public']['upload']);
|
$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() {
|
public function testFederatedSharingIncomming() {
|
||||||
$map = [
|
$map = [
|
||||||
['files_sharing', 'incoming_server2server_share_enabled', 'yes', 'yes'],
|
['files_sharing', 'incoming_server2server_share_enabled', 'yes', 'yes'],
|
||||||
|
|
Loading…
Reference in New Issue