diff options
author | Robin Appelman <robin@icewind.nl> | 2016-08-09 14:05:02 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-08-17 10:40:59 +0200 |
commit | c62e512989e720f3ffc02cf5d17801438bb95bdc (patch) | |
tree | 1ca1fab765991b516c3a213216e4888a3114f5cb /apps/files_external/templates | |
parent | ce0604bd0627c62671d46d443639815ade4d4852 (diff) | |
download | nextcloud-server-c62e512989e720f3ffc02cf5d17801438bb95bdc.tar.gz nextcloud-server-c62e512989e720f3ffc02cf5d17801438bb95bdc.zip |
hide global credentials in personal when a user cant add mounts
Diffstat (limited to 'apps/files_external/templates')
-rw-r--r-- | apps/files_external/templates/settings.php | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 6fb2a018547..640604c14c5 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -84,24 +84,9 @@ } } ?> -<form autocomplete="false" class="section" action="#" - id="global_credentials"> - <h2><?php p($l->t('External Storage')); ?></h2> - <p><?php p($l->t('Global Credentials')); ?></p> - <input type="text" name="username" - autocomplete="false" - value="<?php p($_['globalCredentials']['user']); ?>" - placeholder="<?php p($l->t('Username')) ?>"/> - <input type="password" name="password" - autocomplete="false" - value="<?php p($_['globalCredentials']['password']); ?>" - placeholder="<?php p($l->t('Password')) ?>"/> - <input type="hidden" name="uid" - value="<?php p($_['globalCredentialsUid']); ?>"/> - <input type="submit" value="<?php p($l->t('Save')) ?>"/> -</form> <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'].''); ?> <table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'> <thead> @@ -200,3 +185,21 @@ </p> <?php endif; ?> </form> + +<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN || $_['allowUserMounting']): ?> + <form autocomplete="false" class="section" action="#" + id="global_credentials"> + <p><?php p($l->t('Global Credentials')); ?></p> + <input type="text" name="username" + autocomplete="false" + value="<?php p($_['globalCredentials']['user']); ?>" + placeholder="<?php p($l->t('Username')) ?>"/> + <input type="password" name="password" + autocomplete="false" + value="<?php p($_['globalCredentials']['password']); ?>" + placeholder="<?php p($l->t('Password')) ?>"/> + <input type="hidden" name="uid" + value="<?php p($_['globalCredentialsUid']); ?>"/> + <input type="submit" value="<?php p($l->t('Save')) ?>"/> + </form> +<?php endif; ?> |