Skip to content

Commit e44751b

Browse files
committed
Fix ldap provider name in template
Before this fix it's impossible to set the provider name in the sign-model since `ldap` is a boolean there and this way not able to have an attribute like `ldap.providerName`. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
1 parent 0138911 commit e44751b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

lib/response.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ function showIndex (req, res, next) {
6969
dropbox: config.isDropboxEnable,
7070
google: config.isGoogleEnable,
7171
ldap: config.isLDAPEnable,
72+
ldapProviderName: config.ldap.providerName,
7273
saml: config.isSAMLEnable,
7374
email: config.isEmailEnable,
7475
allowemailregister: config.allowemailregister,
@@ -103,6 +104,7 @@ function responseHackMD (res, note) {
103104
dropbox: config.isDropboxEnable,
104105
google: config.isGoogleEnable,
105106
ldap: config.isLDAPEnable,
107+
ldapProviderName: config.ldap.providerName,
106108
saml: config.isSAMLEnable,
107109
email: config.isEmailEnable,
108110
allowemailregister: config.allowemailregister,

public/views/shared/signin-modal.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<hr>
5353
<% }%>
5454
<% if(ldap) { %>
55-
<h4>Via <% if (ldap.providerName) { %> <%- ldap.providerName %> (LDAP) <% } else { %> LDAP <% } %></h4>
55+
<h4>Via <% if (ldapProviderName) { %> <%= ldapProviderName %> (LDAP) <% } else { %> LDAP <% } %></h4>
5656
<form data-toggle="validator" role="form" class="form-horizontal" method="post" enctype="application/x-www-form-urlencoded">
5757
<div class="form-group">
5858
<div class="col-sm-12">

0 commit comments

Comments
 (0)