Merge pull request #3843 from nextcloud/encryption-fix-mail-share

take share by mail into consideration if we calculate the access list
This commit is contained in:
Joas Schilling 2017-03-15 15:23:17 +01:00 committed by GitHub
commit f2d3704e97
1 changed files with 3 additions and 3 deletions

View File

@ -269,10 +269,10 @@ class Share extends Constants {
$query = \OC_DB::prepare(' $query = \OC_DB::prepare('
SELECT `share_with` SELECT `share_with`
FROM `*PREFIX*share` FROM `*PREFIX*share`
WHERE `item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')', 1 WHERE `item_source` = ? AND `share_type` IN (?, ?) AND `item_type` IN (\'file\', \'folder\')', 1
); );
$result = $query->execute(array($source, self::SHARE_TYPE_LINK)); $result = $query->execute(array($source, self::SHARE_TYPE_LINK, self::SHARE_TYPE_EMAIL));
if (\OCP\DB::isError($result)) { if (\OCP\DB::isError($result)) {
\OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OCP\Util::ERROR); \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OCP\Util::ERROR);
@ -2881,7 +2881,7 @@ class Share extends Constants {
/** /**
* @param IConfig $config * @param IConfig $config
* @return bool * @return bool
*/ */
public static function enforcePassword(IConfig $config) { public static function enforcePassword(IConfig $config) {
$enforcePassword = $config->getAppValue('core', 'shareapi_enforce_links_password', 'no'); $enforcePassword = $config->getAppValue('core', 'shareapi_enforce_links_password', 'no');