Skip to content
Snippets Groups Projects
Commit dce5d9b5 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Add public upload to capability

parent ddc7f668
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