Skip to content

Commit b129d88

Browse files
committed
Patch ldap-auth plugin to fix subfolder installation
see omniauth/omniauth-ldap#16
1 parent f0898bf commit b129d88

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

conf/ldap-auth-fix-subfolder.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--- discourse-ldap-auth.orig/gems/2.3.3/gems/omniauth-ldap-1.0.5/lib/omniauth/strategies/ldap.rb 2018-04-02 17:58:36.830909997 +0200
2+
+++ discourse-ldap-auth/gems/2.3.3/gems/omniauth-ldap-1.0.5/lib/omniauth/strategies/ldap.rb 2018-04-02 19:17:51.903732202 +0200
3+
@@ -27,7 +27,8 @@
4+
5+
def request_phase
6+
OmniAuth::LDAP::Adaptor.validate @options
7+
- f = OmniAuth::Form.new(:title => (options[:title] || "LDAP Authentication"), :url => callback_path)
8+
+ #Patch applied: https://github.com/omniauth/omniauth-ldap/pull/16
9+
+ f = OmniAuth::Form.new(:title => (options[:title] || "LDAP Authentication"), :url => callback_url)
10+
f.text_field 'Login', 'username'
11+
f.password_field 'Password', 'password'
12+
f.button "Sign In"

scripts/install

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,14 @@ $rake_exec assets:precompile)
201201
# (cd "$final_path"
202202
# exec_as $app bin/rake RAILS_ENV=production assets:precompile)
203203

204-
# TODO setup
204+
#=================================================
205+
# CONFIGURE PLUGINS
206+
#=================================================
207+
208+
# Patch ldap-auth plugin to fix it when using domain subfolder
209+
# (Can only do that now because we are patching dependencies which have just been downloaded)
210+
(cd $final_path/plugins/discourse-ldap-auth
211+
patch -p1 < $YNH_CWD/../conf/ldap-auth-fix-subfolder.patch)
205212

206213
#=================================================
207214
# SETUP SYSTEMD

0 commit comments

Comments
 (0)