Skip to content

Add psych4 support#276

Open
d3vr4ndOm wants to merge 1 commit into
cschiewek:defaultfrom
d3vr4ndOm:default
Open

Add psych4 support#276
d3vr4ndOm wants to merge 1 commit into
cschiewek:defaultfrom
d3vr4ndOm:default

Conversation

@d3vr4ndOm

Copy link
Copy Markdown
  • Psych 4 does not load aliases unless aliases: true is provided as an argument
  • Workaround taken from rails: rails/rails@179d0a1

* Psych 4 does not load aliases unless `aliases: true` is provided as an argument
* Workaround take from rails: rails/rails@179d0a1
lostmahbles added a commit to lostmahbles/devise_ldap_authenticatable that referenced this pull request Apr 15, 2022

@olleolleolle olleolleolle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good.

@aminbs

aminbs commented Mar 6, 2023

Copy link
Copy Markdown

Hello will this PR be merged?

@spacemunkay

Copy link
Copy Markdown

While waiting for this to merge and release, one can meanwhile set the ldap_config to a proc in the Devise initializer:

#/config/initializers/devise.rb

Devise.setup do |config|
  config.ldap_config = Proc.new do
    YAML.load(ERB.new(File.read("#{Rails.root}/config/ldap.yml")).result, aliases: true)[Rails.env]
  end
end

See:

@Matt7983

Matt7983 commented Feb 29, 2024

Copy link
Copy Markdown

While waiting for this to merge and release, one can meanwhile set the ldap_config to a proc in the Devise initializer:

#/config/initializers/devise.rb

Devise.setup do |config|
  config.ldap_config = Proc.new do
    YAML.load(ERB.new(File.read("#{Rails.root}/config/ldap.yml")).result, aliases: true)[Rails.env]
  end
end

See:

Use the similar method, here's my ldap_config setting:
config.ldap_config = Proc.new() {YAML.unsafe_load(ERB.new(File.read("#{Rails.root}/config/ldap.yml")).result)[Rails.env]}

@Sinhyeok

Copy link
Copy Markdown

@schlumpfit

Hello, could you merge this PR?

@d3vr4ndOm d3vr4ndOm closed this Aug 10, 2024
@d3vr4ndOm d3vr4ndOm reopened this Aug 10, 2024
@d3vr4ndOm

Copy link
Copy Markdown
Author

@Sinhyeok, I am not sure if I miss something, but it looks like I have no permission to merge and the repo seems unmaintained to me.

Sorry for the close and reopen, it was a mistake from my mobile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants