diff options
Diffstat (limited to 'app/constants.php')
-rw-r--r-- | app/constants.php | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/app/constants.php b/app/constants.php index da3de840..4201e6e4 100644 --- a/app/constants.php +++ b/app/constants.php @@ -1,8 +1,8 @@ <?php // Enable/disable debug -defined('DEBUG') or define('DEBUG', false); -defined('DEBUG_FILE') or define('DEBUG_FILE', __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'debug.log'); +defined('DEBUG') or define('DEBUG', getenv('DEBUG')); +defined('DEBUG_FILE') or define('DEBUG_FILE', getenv('DEBUG_FILE') ?: __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'debug.log'); // Plugin directory defined('PLUGINS_DIR') or define('PLUGINS_DIR', __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'plugins'); @@ -23,6 +23,9 @@ defined('DB_HOSTNAME') or define('DB_HOSTNAME', 'localhost'); defined('DB_NAME') or define('DB_NAME', 'kanboard'); defined('DB_PORT') or define('DB_PORT', null); +// Database backend group provider +defined('DB_GROUP_PROVIDER') or define('DB_GROUP_PROVIDER', true); + // LDAP configuration defined('LDAP_AUTH') or define('LDAP_AUTH', false); defined('LDAP_SERVER') or define('LDAP_SERVER', ''); @@ -51,27 +54,6 @@ defined('LDAP_GROUP_BASE_DN') or define('LDAP_GROUP_BASE_DN', ''); defined('LDAP_GROUP_FILTER') or define('LDAP_GROUP_FILTER', ''); defined('LDAP_GROUP_ATTRIBUTE_NAME') or define('LDAP_GROUP_ATTRIBUTE_NAME', 'cn'); -// Google authentication -defined('GOOGLE_AUTH') or define('GOOGLE_AUTH', false); -defined('GOOGLE_CLIENT_ID') or define('GOOGLE_CLIENT_ID', ''); -defined('GOOGLE_CLIENT_SECRET') or define('GOOGLE_CLIENT_SECRET', ''); - -// Github authentication -defined('GITHUB_AUTH') or define('GITHUB_AUTH', false); -defined('GITHUB_CLIENT_ID') or define('GITHUB_CLIENT_ID', ''); -defined('GITHUB_CLIENT_SECRET') or define('GITHUB_CLIENT_SECRET', ''); -defined('GITHUB_OAUTH_AUTHORIZE_URL') or define('GITHUB_OAUTH_AUTHORIZE_URL', 'https://github.com/login/oauth/authorize'); -defined('GITHUB_OAUTH_TOKEN_URL') or define('GITHUB_OAUTH_TOKEN_URL', 'https://github.com/login/oauth/access_token'); -defined('GITHUB_API_URL') or define('GITHUB_API_URL', 'https://api.github.com/'); - -// Gitlab authentication -defined('GITLAB_AUTH') or define('GITLAB_AUTH', false); -defined('GITLAB_CLIENT_ID') or define('GITLAB_CLIENT_ID', ''); -defined('GITLAB_CLIENT_SECRET') or define('GITLAB_CLIENT_SECRET', ''); -defined('GITLAB_OAUTH_AUTHORIZE_URL') or define('GITLAB_OAUTH_AUTHORIZE_URL', 'https://gitlab.com/oauth/authorize'); -defined('GITLAB_OAUTH_TOKEN_URL') or define('GITLAB_OAUTH_TOKEN_URL', 'https://gitlab.com/oauth/token'); -defined('GITLAB_API_URL') or define('GITLAB_API_URL', 'https://gitlab.com/api/v3/'); - // Proxy authentication defined('REVERSE_PROXY_AUTH') or define('REVERSE_PROXY_AUTH', false); defined('REVERSE_PROXY_USER_HEADER') or define('REVERSE_PROXY_USER_HEADER', 'REMOTE_USER'); @@ -98,7 +80,7 @@ defined('ENABLE_HSTS') or define('ENABLE_HSTS', true); defined('ENABLE_XFRAME') or define('ENABLE_XFRAME', true); // Syslog -defined('ENABLE_SYSLOG') or define('ENABLE_SYSLOG', true); +defined('ENABLE_SYSLOG') or define('ENABLE_SYSLOG', getenv('ENABLE_SYSLOG')); // Default files directory defined('FILES_DIR') or define('FILES_DIR', 'data'.DIRECTORY_SEPARATOR.'files'); @@ -115,6 +97,9 @@ defined('ENABLE_URL_REWRITE') or define('ENABLE_URL_REWRITE', isset($_SERVER['HT // Hide login form defined('HIDE_LOGIN_FORM') or define('HIDE_LOGIN_FORM', false); +// Disabling logout (for external SSO authentication) +defined('DISABLE_LOGOUT') or define('DISABLE_LOGOUT', false); + // Bruteforce protection defined('BRUTEFORCE_CAPTCHA') or define('BRUTEFORCE_CAPTCHA', 3); defined('BRUTEFORCE_LOCKDOWN') or define('BRUTEFORCE_LOCKDOWN', 6); |