diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2013-01-11 14:18:51 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2013-01-11 14:18:51 +0100 |
commit | 466cdab680d74cad2cbb902efa3e3c2f9e35f767 (patch) | |
tree | 3d1b553668b16a57c68721ee325ee734df886906 /settings/admin.php | |
parent | 60489764f37a6f344fa20e361a26c7a6006f9c97 (diff) | |
download | nextcloud-server-466cdab680d74cad2cbb902efa3e3c2f9e35f767.tar.gz nextcloud-server-466cdab680d74cad2cbb902efa3e3c2f9e35f767.zip |
Add security section to admin menu
Currently it only allows the admin to enable or disable the HTTPS
enforcement, but in the future it could be expanded to further options.
The HTTPS enforcement only allows the admin to enforce it, if he is
connected via HTTPS. (To prevent admins to enable it without a proper
SSL setup)
Diffstat (limited to 'settings/admin.php')
-rwxr-xr-x | settings/admin.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/settings/admin.php b/settings/admin.php index 04905391138..4d9685ab920 100755 --- a/settings/admin.php +++ b/settings/admin.php @@ -33,6 +33,16 @@ $tmpl->assign('internetconnectionworking', OC_Util::isinternetconnectionworking( $tmpl->assign('islocaleworking', OC_Util::issetlocaleworking()); $tmpl->assign('backgroundjobs_mode', OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax')); $tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes')); + +// Check if connected using HTTPS +if (OC_Request::serverProtocol() == 'https') { + $connectedHTTPS = true; +} else { + $connectedHTTPS = false; +} +$tmpl->assign('isConnectedViaHTTPS', $connectedHTTPS); +$tmpl->assign('enforceHTTPSEnabled', OC_Config::getValue( "forcessl", false)); + $tmpl->assign('allowLinks', OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes')); $tmpl->assign('allowResharing', OC_Appconfig::getValue('core', 'shareapi_allow_resharing', 'yes')); $tmpl->assign('sharePolicy', OC_Appconfig::getValue('core', 'shareapi_share_policy', 'global')); |