From b0ac2013402001408a9cf35a7fa6c91bf224d287 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 16 Jul 2015 21:06:47 -0400 Subject: Add config parameter to hide login form --- app/Template/auth/index.php | 24 ++++++++++++++---------- app/constants.php | 3 +++ config.default.php | 2 ++ docs/config.markdown | 3 +++ 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/app/Template/auth/index.php b/app/Template/auth/index.php index 9dcdfa37..6f4d93cc 100644 --- a/app/Template/auth/index.php +++ b/app/Template/auth/index.php @@ -4,6 +4,7 @@

e($errors['login']) ?>

+
form->csrf() ?> @@ -16,21 +17,24 @@ form->checkbox('remember_me', t('Remember Me'), 1, true) ?>
- - -
+ + + + + \ No newline at end of file diff --git a/app/constants.php b/app/constants.php index 20eb7db2..7270db23 100644 --- a/app/constants.php +++ b/app/constants.php @@ -84,3 +84,6 @@ defined('API_AUTHENTICATION_HEADER') or define('API_AUTHENTICATION_HEADER', ''); // Enable/disable url rewrite defined('ENABLE_URL_REWRITE') or define('ENABLE_URL_REWRITE', isset($_SERVER['HTTP_MOD_REWRITE'])); + +// Hide login form +defined('HIDE_LOGIN_FORM') or define('HIDE_LOGIN_FORM', false); diff --git a/config.default.php b/config.default.php index 514a8121..38453455 100644 --- a/config.default.php +++ b/config.default.php @@ -154,3 +154,5 @@ define('API_AUTHENTICATION_HEADER', ''); // Enable/disable url rewrite define('ENABLE_URL_REWRITE', false); +// Hide login form, useful if all your users use Google/Github/ReverseProxy authentication +define('HIDE_LOGIN_FORM', false); diff --git a/docs/config.markdown b/docs/config.markdown index ed9f5508..aca605ca 100644 --- a/docs/config.markdown +++ b/docs/config.markdown @@ -202,4 +202,7 @@ define('MARKDOWN_ESCAPE_HTML', true); // API alternative authentication header, the default is HTTP Basic Authentication defined in RFC2617 define('API_AUTHENTICATION_HEADER', ''); + +// Hide login form, useful if all your users use Google/Github/ReverseProxy authentication +define('HIDE_LOGIN_FORM', false); ``` -- cgit v1.2.3