aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/dav/lib/connector/sabre/node.php8
-rw-r--r--apps/dav/tests/unit/connector/sabre/node.php36
-rwxr-xr-xautotest-external.sh2
-rw-r--r--build/integration/features/sharing-v1.feature4
-rw-r--r--lib/private/share/share.php2
-rw-r--r--settings/Controller/AppSettingsController.php25
-rw-r--r--settings/js/apps.js2
-rw-r--r--settings/js/users/groups.js2
-rw-r--r--settings/templates/apps.php2
-rw-r--r--tests/core/command/encryption/changekeystorageroottest.php4
10 files changed, 53 insertions, 34 deletions
diff --git a/apps/dav/lib/connector/sabre/node.php b/apps/dav/lib/connector/sabre/node.php
index 9867fe66cd3..eaba6713992 100644
--- a/apps/dav/lib/connector/sabre/node.php
+++ b/apps/dav/lib/connector/sabre/node.php
@@ -246,14 +246,6 @@ abstract class Node implements \Sabre\DAV\INode {
}
/*
- * Without sharing permissions there are also no other permissions
- */
- if (!($permissions & \OCP\Constants::PERMISSION_SHARE) ||
- !($permissions & \OCP\Constants::PERMISSION_READ)) {
- return 0;
- }
-
- /*
* Files can't have create or delete permissions
*/
if ($this->info->getType() === \OCP\Files\FileInfo::TYPE_FILE) {
diff --git a/apps/dav/tests/unit/connector/sabre/node.php b/apps/dav/tests/unit/connector/sabre/node.php
index cde8e746dc3..6fdf77adc21 100644
--- a/apps/dav/tests/unit/connector/sabre/node.php
+++ b/apps/dav/tests/unit/connector/sabre/node.php
@@ -66,14 +66,14 @@ class Node extends \Test\TestCase {
public function sharePermissionsProvider() {
return [
- [\OCP\Files\FileInfo::TYPE_FILE, 1, 0],
- [\OCP\Files\FileInfo::TYPE_FILE, 3, 0],
- [\OCP\Files\FileInfo::TYPE_FILE, 5, 0],
- [\OCP\Files\FileInfo::TYPE_FILE, 7, 0],
- [\OCP\Files\FileInfo::TYPE_FILE, 9, 0],
- [\OCP\Files\FileInfo::TYPE_FILE, 11, 0],
- [\OCP\Files\FileInfo::TYPE_FILE, 13, 0],
- [\OCP\Files\FileInfo::TYPE_FILE, 15, 0],
+ [\OCP\Files\FileInfo::TYPE_FILE, 1, 1],
+ [\OCP\Files\FileInfo::TYPE_FILE, 3, 3],
+ [\OCP\Files\FileInfo::TYPE_FILE, 5, 1],
+ [\OCP\Files\FileInfo::TYPE_FILE, 7, 3],
+ [\OCP\Files\FileInfo::TYPE_FILE, 9, 1],
+ [\OCP\Files\FileInfo::TYPE_FILE, 11, 3],
+ [\OCP\Files\FileInfo::TYPE_FILE, 13, 1],
+ [\OCP\Files\FileInfo::TYPE_FILE, 15, 3],
[\OCP\Files\FileInfo::TYPE_FILE, 17, 17],
[\OCP\Files\FileInfo::TYPE_FILE, 19, 19],
[\OCP\Files\FileInfo::TYPE_FILE, 21, 17],
@@ -81,16 +81,16 @@ class Node extends \Test\TestCase {
[\OCP\Files\FileInfo::TYPE_FILE, 25, 17],
[\OCP\Files\FileInfo::TYPE_FILE, 27, 19],
[\OCP\Files\FileInfo::TYPE_FILE, 29, 17],
- [\OCP\Files\FileInfo::TYPE_FILE, 30, 0],
+ [\OCP\Files\FileInfo::TYPE_FILE, 30, 18],
[\OCP\Files\FileInfo::TYPE_FILE, 31, 19],
- [\OCP\Files\FileInfo::TYPE_FOLDER, 1, 0],
- [\OCP\Files\FileInfo::TYPE_FOLDER, 3, 0],
- [\OCP\Files\FileInfo::TYPE_FOLDER, 5, 0],
- [\OCP\Files\FileInfo::TYPE_FOLDER, 7, 0],
- [\OCP\Files\FileInfo::TYPE_FOLDER, 9, 0],
- [\OCP\Files\FileInfo::TYPE_FOLDER, 11, 0],
- [\OCP\Files\FileInfo::TYPE_FOLDER, 13, 0],
- [\OCP\Files\FileInfo::TYPE_FOLDER, 15, 0],
+ [\OCP\Files\FileInfo::TYPE_FOLDER, 1, 1],
+ [\OCP\Files\FileInfo::TYPE_FOLDER, 3, 3],
+ [\OCP\Files\FileInfo::TYPE_FOLDER, 5, 5],
+ [\OCP\Files\FileInfo::TYPE_FOLDER, 7, 7],
+ [\OCP\Files\FileInfo::TYPE_FOLDER, 9, 9],
+ [\OCP\Files\FileInfo::TYPE_FOLDER, 11, 11],
+ [\OCP\Files\FileInfo::TYPE_FOLDER, 13, 13],
+ [\OCP\Files\FileInfo::TYPE_FOLDER, 15, 15],
[\OCP\Files\FileInfo::TYPE_FOLDER, 17, 17],
[\OCP\Files\FileInfo::TYPE_FOLDER, 19, 19],
[\OCP\Files\FileInfo::TYPE_FOLDER, 21, 21],
@@ -98,7 +98,7 @@ class Node extends \Test\TestCase {
[\OCP\Files\FileInfo::TYPE_FOLDER, 25, 25],
[\OCP\Files\FileInfo::TYPE_FOLDER, 27, 27],
[\OCP\Files\FileInfo::TYPE_FOLDER, 29, 29],
- [\OCP\Files\FileInfo::TYPE_FOLDER, 30, 0],
+ [\OCP\Files\FileInfo::TYPE_FOLDER, 30, 30],
[\OCP\Files\FileInfo::TYPE_FOLDER, 31, 31],
];
}
diff --git a/autotest-external.sh b/autotest-external.sh
index 643153bb064..ef6516c0721 100755
--- a/autotest-external.sh
+++ b/autotest-external.sh
@@ -218,7 +218,7 @@ EOF
stopFile=`echo "$startFile" | sed 's/start/stop/'`
echo "stop: $stopFile"
if [ -f $FILES_EXTERNAL_BACKEND_ENV_PATH/$stopFile ]; then
- # execute stop file if existant
+ # execute stop file if existent
./$FILES_EXTERNAL_BACKEND_ENV_PATH/$stopFile
fi
if [ "$DOEXIT" ]; then
diff --git a/build/integration/features/sharing-v1.feature b/build/integration/features/sharing-v1.feature
index b9d77120b9c..83b72cc7449 100644
--- a/build/integration/features/sharing-v1.feature
+++ b/build/integration/features/sharing-v1.feature
@@ -593,7 +593,7 @@ Feature: sharing
| permissions | 3 |
When as "user1" gets properties of folder "/tmp.txt" with
|{http://owncloud.org/ns}share-permissions|
- Then the single response should contain a property "{http://owncloud.org/ns}share-permissions" with value "0"
+ Then the single response should contain a property "{http://owncloud.org/ns}share-permissions" with value "3"
Scenario: Correct webdav share-permissions for received file with reshare permissions but no edit permissions
Given user "user0" exists
@@ -669,4 +669,4 @@ Feature: sharing
| permissions | 15 |
When as "user1" gets properties of folder "/tmp" with
|{http://owncloud.org/ns}share-permissions|
- Then the single response should contain a property "{http://owncloud.org/ns}share-permissions" with value "0"
+ Then the single response should contain a property "{http://owncloud.org/ns}share-permissions" with value "15"
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 3dcfa14079b..c6f7258c536 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1265,7 +1265,7 @@ class Share extends Constants {
/**
* validate expiration date if it meets all constraints
*
- * @param string $expireDate well formate date string, e.g. "DD-MM-YYYY"
+ * @param string $expireDate well formatted date string, e.g. "DD-MM-YYYY"
* @param string $shareTime timestamp when the file was shared
* @param string $itemType
* @param string $itemSource
diff --git a/settings/Controller/AppSettingsController.php b/settings/Controller/AppSettingsController.php
index cc69d3130d9..6c86cbf2cd3 100644
--- a/settings/Controller/AppSettingsController.php
+++ b/settings/Controller/AppSettingsController.php
@@ -259,6 +259,12 @@ class AppSettingsController extends Controller {
$apps = array_filter($apps, function ($app) use ($installedApps) {
return !in_array($app['id'], $installedApps);
});
+
+ // show tooltip if app is downloaded from remote server
+ $inactiveApps = $this->getInactiveApps();
+ foreach ($apps as &$app) {
+ $app['needsDownload'] = !in_array($app['id'], $inactiveApps);
+ }
}
// sort by score
@@ -319,4 +325,23 @@ class AppSettingsController extends Controller {
});
return $apps;
}
+
+ /**
+ * @return array
+ */
+ private function getInactiveApps() {
+ $inactiveApps = \OC_App::listAllApps(true, false, $this->ocsClient);
+ $inactiveApps = array_filter($inactiveApps,
+ function ($app) {
+ return !$app['active'];
+ });
+ $inactiveApps = array_map(function($app) {
+ if (isset($app['ocsid'])) {
+ return $app['ocsid'];
+ }
+ return $app['id'];
+ }, $inactiveApps);
+ return $inactiveApps;
+ }
+
}
diff --git a/settings/js/apps.js b/settings/js/apps.js
index e052a9ee9d3..1b687012815 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -119,6 +119,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
$('#apps-list-empty').removeClass('hidden').find('h2').text(t('settings', 'No apps found for your version'));
}
+ $('.enable.needs-download').tipsy({fallback: t('settings', 'The app will be downloaded from the app store')});
+
$('.app-level .official').tipsy({fallback: t('settings', 'Official apps are developed by and within the ownCloud community. They offer functionality central to ownCloud and are ready for production use.')});
$('.app-level .approved').tipsy({fallback: t('settings', 'Approved apps are developed by trusted developers and have passed a cursory security check. They are actively maintained in an open code repository and their maintainers deem them to be stable for casual to normal use.')});
$('.app-level .experimental').tipsy({fallback: t('settings', 'This app is not checked for security issues and is new or known to be unstable. Install at your own risk.')});
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js
index 27c41884504..36ebbd2fa6e 100644
--- a/settings/js/users/groups.js
+++ b/settings/js/users/groups.js
@@ -31,7 +31,7 @@ GroupList = {
setUserCount: function (groupLiElement, usercount) {
if ($sortGroupBy !== 1) {
- // If we don't sort by group count we dont display them either
+ // If we don't sort by group count we don't display them either
return;
}
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index 47d1eff463e..ce6dcef842c 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -134,7 +134,7 @@ script(
<br />
<input type="hidden" id="group_select" title="<?php p($l->t('All')); ?>" style="width: 200px">
{{else}}
- <input class="enable" type="submit" data-appid="{{id}}" data-active="false" {{#unless canInstall}}disabled="disabled"{{/unless}} value="<?php p($l->t("Enable"));?>"/>
+ <input class="enable{{#if needsDownload}} needs-download{{/if}}" type="submit" data-appid="{{id}}" data-active="false" {{#unless canInstall}}disabled="disabled"{{/unless}} value="<?php p($l->t("Enable"));?>"/>
{{/if}}
{{#if canUnInstall}}
<input class="uninstall" type="submit" value="<?php p($l->t('Uninstall App')); ?>" data-appid="{{id}}" />
diff --git a/tests/core/command/encryption/changekeystorageroottest.php b/tests/core/command/encryption/changekeystorageroottest.php
index 6cb52cdea99..2a1f48983f1 100644
--- a/tests/core/command/encryption/changekeystorageroottest.php
+++ b/tests/core/command/encryption/changekeystorageroottest.php
@@ -74,9 +74,9 @@ class ChangeKeyStorageRootTest extends TestCase {
$this->outputInterface = $this->getMock('Symfony\Component\Console\Output\OutputInterface');
$this->userInterface = $this->getMock('\OCP\UserInterface');
- $outputFormaterInterface = $this->getMock('Symfony\Component\Console\Formatter\OutputFormatterInterface');
+ $outputFormatterInterface = $this->getMock('Symfony\Component\Console\Formatter\OutputFormatterInterface');
$this->outputInterface->expects($this->any())->method('getFormatter')
- ->willReturn($outputFormaterInterface);
+ ->willReturn($outputFormatterInterface);
$this->changeKeyStorageRoot = new ChangeKeyStorageRoot(
$this->view,