Skip to content
Snippets Groups Projects
Commit 184b4e7d authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #18320 from owncloud/public_upload_capability

Add public upload to capability
parents 72f829eb dce5d9b5
Branches
No related tags found
No related merge requests found
......@@ -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']);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment