[ARVADOS-WORKBENCH2] updated: 1.4.1-407-ga2a35bb1
Git user
git at public.arvados.org
Fri Aug 21 15:44:30 UTC 2020
Summary of changes:
src/views/login-panel/login-panel.tsx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
via a2a35bb1683304edd8d20e1a2b5df29e81669b46 (commit)
from f0fb75714e54f5191a7026eedbec757ee22a682c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit a2a35bb1683304edd8d20e1a2b5df29e81669b46
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date: Fri Aug 21 17:44:01 2020 +0200
16735: Added array of possible login methods
Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
diff --git a/src/views/login-panel/login-panel.tsx b/src/views/login-panel/login-panel.tsx
index 1d7e6ad4..c857c0b2 100644
--- a/src/views/login-panel/login-panel.tsx
+++ b/src/views/login-panel/login-panel.tsx
@@ -70,9 +70,14 @@ type LoginPanelProps = DispatchProp<any> & WithStyles<CssRules> & {
passwordLogin: boolean,
};
+const loginOptions = ['LDAP', 'PAM'];
+
export const requirePasswordLogin = (config: Config): boolean => {
- if (config && config.clusterConfig && config.clusterConfig.Login && (config.clusterConfig.Login.LDAP || config.clusterConfig.Login.PAM)) {
- return config.clusterConfig.Login.LDAP.Enable || config.clusterConfig.Login.PAM.Enable || false;
+ if (config && config.clusterConfig && config.clusterConfig.Login) {
+ return loginOptions
+ .filter(loginOption => !!config.clusterConfig.Login[loginOption])
+ .map(loginOption => config.clusterConfig.Login[loginOption].Enable)
+ .find(enabled => enabled === true) || false;
}
return false;
};
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list