mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Fix DEBUG environment variable check
This commit is contained in:
parent
09f6dcbde1
commit
f010235ff2
3 changed files with 6 additions and 6 deletions
|
|
@ -20,7 +20,7 @@ export const TAPi18n = {
|
||||||
cleanCode: true,
|
cleanCode: true,
|
||||||
// Show translations debug messages only when DEBUG=true
|
// Show translations debug messages only when DEBUG=true
|
||||||
// OLD: debug: Meteor.isDevelopment,
|
// OLD: debug: Meteor.isDevelopment,
|
||||||
debug: process.env.DEBUG,
|
debug: process.env.DEBUG === 'true',
|
||||||
supportedLngs: Object.values(languages).map(({ tag }) => tag),
|
supportedLngs: Object.values(languages).map(({ tag }) => tag),
|
||||||
ns: DEFAULT_NAMESPACE,
|
ns: DEFAULT_NAMESPACE,
|
||||||
defaultNs: DEFAULT_NAMESPACE,
|
defaultNs: DEFAULT_NAMESPACE,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ var serviceData = {};
|
||||||
var userinfo = {};
|
var userinfo = {};
|
||||||
|
|
||||||
OAuth.registerService('oidc', 2, null, function (query) {
|
OAuth.registerService('oidc', 2, null, function (query) {
|
||||||
var debug = process.env.DEBUG || false;
|
var debug = process.env.DEBUG === 'true';
|
||||||
|
|
||||||
var token = getToken(query);
|
var token = getToken(query);
|
||||||
if (debug) console.log('XXX: register token:', token);
|
if (debug) console.log('XXX: register token:', token);
|
||||||
|
|
@ -135,7 +135,7 @@ if (Meteor.release) {
|
||||||
|
|
||||||
if (process.env.ORACLE_OIM_ENABLED !== 'true' && process.env.ORACLE_OIM_ENABLED !== true) {
|
if (process.env.ORACLE_OIM_ENABLED !== 'true' && process.env.ORACLE_OIM_ENABLED !== true) {
|
||||||
var getToken = function (query) {
|
var getToken = function (query) {
|
||||||
var debug = process.env.DEBUG || false;
|
var debug = process.env.DEBUG === 'true';
|
||||||
var config = getConfiguration();
|
var config = getConfiguration();
|
||||||
if(config.tokenEndpoint.includes('https://')){
|
if(config.tokenEndpoint.includes('https://')){
|
||||||
var serverTokenEndpoint = config.tokenEndpoint;
|
var serverTokenEndpoint = config.tokenEndpoint;
|
||||||
|
|
@ -181,7 +181,7 @@ if (process.env.ORACLE_OIM_ENABLED !== 'true' && process.env.ORACLE_OIM_ENABLED
|
||||||
if (process.env.ORACLE_OIM_ENABLED === 'true' || process.env.ORACLE_OIM_ENABLED === true) {
|
if (process.env.ORACLE_OIM_ENABLED === 'true' || process.env.ORACLE_OIM_ENABLED === true) {
|
||||||
|
|
||||||
var getToken = function (query) {
|
var getToken = function (query) {
|
||||||
var debug = (process.env.DEBUG === 'true' || process.env.DEBUG === true) || false;
|
var debug = process.env.DEBUG === 'true';
|
||||||
var config = getConfiguration();
|
var config = getConfiguration();
|
||||||
if(config.tokenEndpoint.includes('https://')){
|
if(config.tokenEndpoint.includes('https://')){
|
||||||
var serverTokenEndpoint = config.tokenEndpoint;
|
var serverTokenEndpoint = config.tokenEndpoint;
|
||||||
|
|
@ -240,7 +240,7 @@ if (process.env.ORACLE_OIM_ENABLED === 'true' || process.env.ORACLE_OIM_ENABLED
|
||||||
|
|
||||||
|
|
||||||
var getUserInfo = function (accessToken) {
|
var getUserInfo = function (accessToken) {
|
||||||
var debug = process.env.DEBUG || false;
|
var debug = process.env.DEBUG === 'true';
|
||||||
var config = getConfiguration();
|
var config = getConfiguration();
|
||||||
// Some userinfo endpoints use a different base URL than the authorization or token endpoints.
|
// Some userinfo endpoints use a different base URL than the authorization or token endpoints.
|
||||||
// This logic allows the end user to override the setting by providing the full URL to userinfo in their config.
|
// This logic allows the end user to override the setting by providing the full URL to userinfo in their config.
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ Meteor.startup(() => {
|
||||||
validateUrl: process.env.CASE_VALIDATE_URL,
|
validateUrl: process.env.CASE_VALIDATE_URL,
|
||||||
casVersion: 3.0,
|
casVersion: 3.0,
|
||||||
attributes: {
|
attributes: {
|
||||||
debug: process.env.DEBUG,
|
debug: process.env.DEBUG === 'true',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue