Skip to content

Commit

Permalink
Patch ldap-auth plugin to fix subfolder installation
Browse files Browse the repository at this point in the history
  • Loading branch information
JimboJoe committed Apr 3, 2018
1 parent f0898bf commit b129d88
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
12 changes: 12 additions & 0 deletions conf/ldap-auth-fix-subfolder.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- 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
+++ 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
@@ -27,7 +27,8 @@

def request_phase
OmniAuth::LDAP::Adaptor.validate @options
- f = OmniAuth::Form.new(:title => (options[:title] || "LDAP Authentication"), :url => callback_path)
+ #Patch applied: https://github.com/omniauth/omniauth-ldap/pull/16
+ f = OmniAuth::Form.new(:title => (options[:title] || "LDAP Authentication"), :url => callback_url)
f.text_field 'Login', 'username'
f.password_field 'Password', 'password'
f.button "Sign In"
9 changes: 8 additions & 1 deletion scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,14 @@ $rake_exec assets:precompile)
# (cd "$final_path"
# exec_as $app bin/rake RAILS_ENV=production assets:precompile)

# TODO setup
#=================================================
# CONFIGURE PLUGINS
#=================================================

# Patch ldap-auth plugin to fix it when using domain subfolder
# (Can only do that now because we are patching dependencies which have just been downloaded)
(cd $final_path/plugins/discourse-ldap-auth
patch -p1 < $YNH_CWD/../conf/ldap-auth-fix-subfolder.patch)

#=================================================
# SETUP SYSTEMD
Expand Down

0 comments on commit b129d88

Please sign in to comment.