diff options
author | Robin Appelman <robin@icewind.nl> | 2016-08-09 14:09:53 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-08-17 10:40:59 +0200 |
commit | ff89354588252340cd76a0b135e30fcb4fab7b30 (patch) | |
tree | 376d27b49765fa49cdc8226fb26d32441d06ea5a /apps/files_external/templates | |
parent | c62e512989e720f3ffc02cf5d17801438bb95bdc (diff) | |
download | nextcloud-server-ff89354588252340cd76a0b135e30fcb4fab7b30.tar.gz nextcloud-server-ff89354588252340cd76a0b135e30fcb4fab7b30.zip |
don't show dependency info if we cant create new mounts
Diffstat (limited to 'apps/files_external/templates')
-rw-r--r-- | apps/files_external/templates/settings.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 640604c14c5..47230f98bd3 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"); @@ -87,7 +89,7 @@ <form id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>"> <h2><?php p($l->t('External Storage')); ?></h2> - <?php if (isset($_['dependencies']) and ($_['dependencies']<>'')) print_unescaped(''.$_['dependencies'].''); ?> + <?php if (isset($_['dependencies']) and ($_['dependencies']<>'') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?> <table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'> <thead> <tr> @@ -103,7 +105,7 @@ </thead> <tbody> <tr id="addMountPoint" - <?php if ($_['visibilityType'] === BackendService::VISIBILITY_PERSONAL && $_['allowUserMounting'] === false): ?> + <?php if (!$canCreateMounts): ?> style="display: none;" <?php endif; ?> > @@ -186,7 +188,7 @@ <?php endif; ?> </form> -<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN || $_['allowUserMounting']): ?> +<?php if ($canCreateMounts): ?> <form autocomplete="false" class="section" action="#" id="global_credentials"> <p><?php p($l->t('Global Credentials')); ?></p> |