diff --git a/apps/files_external/appinfo/info.xml b/apps/files_external/appinfo/info.xml
index ba12d1ff676dd..39b669fcc927d 100644
--- a/apps/files_external/appinfo/info.xml
+++ b/apps/files_external/appinfo/info.xml
@@ -3,9 +3,9 @@
files_external
External storage support
- This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, Google Drive, Dropbox, other ownCloud servers, WebDAV servers, and more. Administrators can choose which types of storage to enable and can mount these storage locations for a user, a group, or the entire system. Users will see a new folder appear in their root ownCloud directory, which they can access and use like any other ownCloud folder. External Storage also allows users to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.
+ This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, Google Drive, Dropbox, other ownCloud servers, WebDAV servers, and more. Administrators can choose which types of storage to enable and can mount these storage locations for a user, a group, or the entire system. Users will see a new folder appear in their root ownCloud directory, which they can access and use like any other ownCloud folder. External storage also allows users to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.
- External Storage can be configured using the GUI or at the command line. This second option provides the advanced user with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the External Storage GUI documentation and the External Storage Configuration File documentation.
+ External storage can be configured using the GUI or at the command line. This second option provides the advanced user with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation.
AGPL
Robin Appelman, Michael Gapczynski, Vincent Petry
diff --git a/apps/files_external/css/settings.css b/apps/files_external/css/settings.css
index 4d5dc69a4e789..38e497eebe69c 100644
--- a/apps/files_external/css/settings.css
+++ b/apps/files_external/css/settings.css
@@ -1,3 +1,16 @@
+#global_credentials {
+ padding: 0 30px;
+ margin-bottom: 0px;
+}
+
+#files_external {
+ margin-bottom: 0px;
+}
+
+#externalStorage {
+ margin: 15px 0 20px 0;
+}
+
#externalStorage td.status {
/* overwrite conflicting core styles */
display: table-cell;
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index fc6edefc64808..da3e2397b7ea9 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -945,6 +945,11 @@ MountConfigListView.prototype = _.extend({
$tr.find('.configuration').text(t('files_external', 'Admin defined'));
}
});
+ var mainForm = $('#files_external');
+ if (result.length === 0 && mainForm.attr('data-can-create') === 'false') {
+ mainForm.hide();
+ $('a[href="#external-storage"]').parent().hide();
+ }
onCompletion.resolve();
}
});
diff --git a/apps/files_external/lib/AppInfo/Application.php b/apps/files_external/lib/AppInfo/Application.php
index 06c163419f060..fcf10adb3755b 100644
--- a/apps/files_external/lib/AppInfo/Application.php
+++ b/apps/files_external/lib/AppInfo/Application.php
@@ -68,7 +68,18 @@ public function __construct(array $urlParams = array()) {
* Register settings templates
*/
public function registerSettings() {
- \OCP\App::registerPersonal('files_external', 'personal');
+ $container = $this->getContainer();
+ $userSession = $container->getServer()->getUserSession();
+ if (!$userSession->isLoggedIn()) {
+ return;
+ }
+ $backendService = $container->query('OCA\\Files_External\\Service\\BackendService');
+
+ /** @var \OCA\Files_External\Service\UserGlobalStoragesService $userGlobalStoragesService */
+ $userGlobalStoragesService = $container->query('OCA\Files_External\Service\UserGlobalStoragesService');
+ if (count($userGlobalStoragesService->getStorages()) > 0 || $backendService->isUserMountingAllowed()) {
+ \OCP\App::registerPersonal('files_external', 'personal');
+ }
}
/**
diff --git a/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php b/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php
index 502024be4f201..c0ece745aa4bf 100644
--- a/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php
+++ b/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php
@@ -48,7 +48,7 @@ public function __construct(IL10N $l, ICredentialsManager $credentialsManager) {
->setIdentifier('password::global')
->setVisibility(BackendService::VISIBILITY_DEFAULT)
->setScheme(self::SCHEME_PASSWORD)
- ->setText($l->t('Global Credentials'));
+ ->setText($l->t('Global credentials'));
}
public function getAuth($uid) {
diff --git a/apps/files_external/lib/Lib/Backend/OwnCloud.php b/apps/files_external/lib/Lib/Backend/OwnCloud.php
index 59d1b2cec52b6..1304b09c87c06 100644
--- a/apps/files_external/lib/Lib/Backend/OwnCloud.php
+++ b/apps/files_external/lib/Lib/Backend/OwnCloud.php
@@ -37,7 +37,7 @@ public function __construct(IL10N $l, Password $legacyAuth) {
->setIdentifier('owncloud')
->addIdentifierAlias('\OC\Files\Storage\OwnCloud') // legacy compat
->setStorageClass('\OCA\Files_External\Lib\Storage\OwnCloud')
- ->setText($l->t('ownCloud'))
+ ->setText($l->t('Nextcloud'))
->addParameters([
(new DefinitionParameter('host', $l->t('URL'))),
(new DefinitionParameter('root', $l->t('Remote subfolder')))
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index cd3b4d9f3cb43..7a10d4bbc242a 100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -285,7 +285,7 @@ public static function dependencyMessage($backends) {
foreach ($backends as $backend) {
foreach ($backend->checkDependencies() as $dependency) {
if ($message = $dependency->getMessage()) {
- $message .= '
' . $l->t('Note: ') . $message;
+ $message .= '
' . $message . '
';
} else {
$dependencyGroups[$dependency->getDependency()][] = $backend;
}
@@ -294,9 +294,9 @@ public static function dependencyMessage($backends) {
foreach ($dependencyGroups as $module => $dependants) {
$backends = implode(', ', array_map(function($backend) {
- return '' . $backend->getText() . '';
+ return '"' . $backend->getText() . '"';
}, $dependants));
- $message .= '
' . OC_Mount_Config::getSingleDependencyMessage($l, $module, $backends);
+ $message .= '' . OC_Mount_Config::getSingleDependencyMessage($l, $module, $backends) . '
';
}
return $message;
@@ -313,11 +313,11 @@ public static function dependencyMessage($backends) {
private static function getSingleDependencyMessage(\OCP\IL10N $l, $module, $backend) {
switch (strtolower($module)) {
case 'curl':
- return (string)$l->t('Note: The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend);
+ return (string)$l->t('The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend);
case 'ftp':
- return (string)$l->t('Note: The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend);
+ return (string)$l->t('The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend);
default:
- return (string)$l->t('Note: "%s" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it.', array($module, $backend));
+ return (string)$l->t('"%s" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it.', array($module, $backend));
}
}
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index 6fb2a0185479e..53d2412425c22 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -4,6 +4,8 @@
use \OCA\Files_External\Lib\DefinitionParameter;
use \OCA\Files_External\Service\BackendService;
+ $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN || $_['allowUserMounting'];
+
$l->t("Enable encryption");
$l->t("Enable previews");
$l->t("Enable sharing");
@@ -84,25 +86,10 @@ function writeParameterInput($parameter, $options, $classes = []) {
}
}
?>
-
-
+
+
+
+