Skip to content

Commit b916917

Browse files
committed
INT-856 filter X509 from AuthenticationOptionCollection when disabled
1 parent 371ea9d commit b916917

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/connect/authentication.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ var AuthenticationOptionCollection = require('./models/authentication-option-col
77

88
var InputView = require('./input-view');
99
var inputTemplate = require('./input-default.jade');
10+
var _ = require('lodash');
1011

1112
var NONE = {
1213
_id: 'NONE',
@@ -88,7 +89,7 @@ var X509 = {
8889
title: 'X.509',
8990
// @todo (imlucas) Fix `app.isFeatureEnabled` is not a function.
9091
// enabled: app.isFeatureEnabled('Connect with X.509'),
91-
enabled: true,
92+
enabled: false,
9293
fields: [
9394
new InputView({
9495
template: inputTemplate,
@@ -125,10 +126,12 @@ var LDAP = {
125126
]
126127
};
127128

128-
module.exports = new AuthenticationOptionCollection([
129+
var allAuthModes = [
129130
NONE,
130131
MONGODB,
131132
KERBEROS,
132133
LDAP,
133134
X509
134-
]);
135+
];
136+
137+
module.exports = new AuthenticationOptionCollection(_.filter(allAuthModes, 'enabled'));

0 commit comments

Comments
 (0)