mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Add public upload to capability
This commit is contained in:
parent
ddc7f668e5
commit
dce5d9b5d1
2 changed files with 21 additions and 0 deletions
|
|
@ -59,6 +59,7 @@ class Capabilities implements ICapability {
|
|||
}
|
||||
|
||||
$public['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_public_notification', 'no') === 'yes';
|
||||
$public['upload'] = $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes') === 'yes';
|
||||
}
|
||||
$res["public"] = $public;
|
||||
|
||||
|
|
|
|||
|
|
@ -183,4 +183,24 @@ class FilesSharingCapabilitiesTest extends \Test\TestCase {
|
|||
$result = $this->getResults($map);
|
||||
$this->assertFalse($result['resharing']);
|
||||
}
|
||||
|
||||
public function testLinkPublicUpload() {
|
||||
$map = [
|
||||
['core', 'shareapi_allow_links', 'yes', 'yes'],
|
||||
['core', 'shareapi_allow_public_upload', 'yes', 'yes'],
|
||||
];
|
||||
$result = $this->getResults($map);
|
||||
$this->assertTrue($result['public']['upload']);
|
||||
}
|
||||
|
||||
public function testLinkNoPublicUpload() {
|
||||
$map = [
|
||||
['core', 'shareapi_allow_links', 'yes', 'yes'],
|
||||
['core', 'shareapi_allow_public_upload', 'yes', 'no'],
|
||||
];
|
||||
$result = $this->getResults($map);
|
||||
$this->assertFalse($result['public']['upload']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue