From f5d95139579fc1865f1f18e13aab24998d2e7d9d Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 25 Nov 2014 16:12:12 +0100 Subject: Allow read-only configuration Workaround required for IIS setups running ownCloud to prevent dataloss. Long-term solution would be to move some configuration settings to the database Conflicts: lib/base.php settings/admin.php --- settings/admin.php | 2 ++ settings/templates/admin.php | 20 +++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'settings') diff --git a/settings/admin.php b/settings/admin.php index 9b1a822bbdc..31ead44134c 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -42,6 +42,7 @@ $tmpl->assign('mail_smtppassword', OC_Config::getValue( "mail_smtppassword", '' $tmpl->assign('entries', $entries); $tmpl->assign('entriesremain', $entriesremain); $tmpl->assign('htaccessworking', $htaccessworking); +$tmpl->assign('readOnlyConfigEnabled', OC_Helper::isReadOnlyConfigEnabled()); $tmpl->assign('isLocaleWorking', OC_Util::isSetLocaleWorking()); $tmpl->assign('isAnnotationsWorking', OC_Util::isAnnotationsWorking()); $tmpl->assign('has_fileinfo', OC_Util::fileInfoLoaded()); @@ -56,6 +57,7 @@ $tmpl->assign('shareEnforceExpireDate', OC_Appconfig::getValue('core', 'shareapi $excludeGroups = OC_Appconfig::getValue('core', 'shareapi_exclude_groups', 'no') === 'yes' ? true : false; $tmpl->assign('shareExcludeGroups', $excludeGroups); $excludedGroupsList = OC_Appconfig::getValue('core', 'shareapi_exclude_groups_list', ''); + $excludedGroupsList = explode(',', $excludedGroupsList); // FIXME: this should be JSON! $tmpl->assign('shareExcludedGroupsList', implode('|', $excludedGroupsList)); diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 90426efa833..20b710744f3 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -62,14 +62,28 @@ if (!$_['isConnectedViaHTTPS']) { // is htaccess working ? if (!$_['htaccessworking']) { ?> -
-

t('Security Warning'));?>

+
+

t('Security Warning')); ?>

t('Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root.')); ?> -
+
+ +
+

t('Read-Only config enabled'));?>

+ + + t('The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update.')); ?> + + +