Compare commits

...
3 changed files with 11 additions and 11 deletions
+5 -1
View File
@@ -222,6 +222,9 @@ function IsValidRedmineUser2FA(username) {
var query = "SELECT users.login AS uid, users.firstname AS givenname, users.lastname AS sn, ";
query += "users.login||\'@"+ config.domain +"\' AS email, organizations.name as memberOf, departments.name as deptName, ";
query += "replace(trim(replace(replace(departments.enabled_product_names, \'-\', \'\'), E\'\n\', \'\')), E\' \', \',\') as features, tokens.value as redmineapikey, cast(users.tfa_enabled as TEXT) as tfa_enabled ";
if (config.redmineHost) {
query += ", CASE WHEN organizations.vncproject_subdomain IS NULL OR organizations.vncproject_subdomain = '' THEN '' ELSE organizations.vncproject_subdomain||'."+ config.redmineHost +"' END as redmine_host ";
}
query += "FROM users JOIN organization_users ON organization_users.user_id=users.id ";
query += "JOIN organizations ON organizations.id=organization_users.organization_id JOIN departments ON departments.id=organization_users.department_id JOIN tokens ON tokens.user_id=users.id ";
query += "WHERE users.status=1 AND lower(users.login)=$1 AND tokens.action=$2 AND organization_users.status=1 AND organizations.active=true";
@@ -239,7 +242,8 @@ function IsValidRedmineUser2FA(username) {
memberOf: dres.rows[0].memberOf,
features: dres.rows[0].features,
redmineapikey: dres.rows[0].redmineapikey,
tfa_enabled: dres.rows[0].tfa_enabled
tfa_enabled: dres.rows[0].tfa_enabled,
redmine_host: dres.rows[0].redmine_host
}
resolve(redmineUser);
} else {
@@ -2,6 +2,9 @@ module.exports = {
development: {
xmppToken: 'ocu8saithoYa2teeb2ahTh9fee4is7ai',
servicePort: 9544,
domain: 'vncmeet.com',
useRedmineAuth: false,
redmineHost: 'vncproject.demp.vnc.de',
ldap: {
ldapUri: 'ldap://zimbra.uxf.zimbra-vnc.de:389',
bindDn: 'uid=zimbra,cn=admins,cn=zimbra',
+3 -10
View File
@@ -3,6 +3,8 @@ module.exports = {
servicePort: 9544,
domain: 'vncmeet.com',
xmppToken: 'oothoudaeraighahkabahphisaiwaeko',
useRedmineAuth: false,
redmineHost: 'vncproject.demp.vnc.de',
ldap: {
ldapUri: 'ldap://zimbra.uxf.zimbra-vnc.de:389',
bindDn: 'uid=zimbra,cn=admins,cn=zimbra',
@@ -21,16 +23,7 @@ module.exports = {
pass: "oolehohqueithaipeikahtaeshoozais",
idleTimeoutMillis: 10000,
connectionTimeoutMillis: 10000
},
redminedb: {
host: "talk.uxf.zimbra-vnc.de",
port: 5432,
name: "prosody",
user: "prosody",
pass: "oolehohqueithaipeikahtaeshoozais",
idleTimeoutMillis: 10000,
connectionTimeoutMillis: 10000
}
}
},
development2: {
xmppToken: 'irithep1KeiViemohmui3fo3eiyeitah',