aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-06-05 13:51:28 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-06-05 13:51:28 +0200
commit57bda411d11a1aab85c74bb288ffc465e181112b (patch)
treeda71124430a8579946438070f6cf12213fa29a83 /apps/files_encryption
parent055c9010910d2b86ab70980b5fea46f9d98a6aa7 (diff)
downloadnextcloud-server-57bda411d11a1aab85c74bb288ffc465e181112b.tar.gz
nextcloud-server-57bda411d11a1aab85c74bb288ffc465e181112b.zip
only show personal settings if the recovery feature is enabled or if no private key is set
Diffstat (limited to 'apps/files_encryption')
-rw-r--r--apps/files_encryption/settings-personal.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/apps/files_encryption/settings-personal.php b/apps/files_encryption/settings-personal.php
index 3aa8b399355..fddc3ea5eee 100644
--- a/apps/files_encryption/settings-personal.php
+++ b/apps/files_encryption/settings-personal.php
@@ -21,12 +21,19 @@ $privateKeySet = ($session->getPrivateKey() !== false) ? true : false;
$recoveryAdminEnabled = OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');
$recoveryEnabledForUser = $util->recoveryEnabledForUser();
-\OCP\Util::addscript('files_encryption', 'settings-personal');
-\OCP\Util::addScript('settings', 'personal');
+$result = false;
-$tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
-$tmpl->assign('recoveryEnabledForUser', $recoveryEnabledForUser);
-$tmpl->assign('privateKeySet', $privateKeySet);
+if ($recoveryAdminEnabled || !$privateKeySet) {
-return $tmpl->fetchPage();
+ \OCP\Util::addscript('files_encryption', 'settings-personal');
+ \OCP\Util::addScript('settings', 'personal');
+
+ $tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
+ $tmpl->assign('recoveryEnabledForUser', $recoveryEnabledForUser);
+ $tmpl->assign('privateKeySet', $privateKeySet);
+
+ $result = $tmpl->fetchPage();
+}
+
+return $result;