Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add psych4 support #276

Open
wants to merge 1 commit into
base: default
Choose a base branch
from
Open

Conversation

schlumpfit
Copy link

  • 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
Copy link
Contributor

@olleolleolle olleolleolle left a comment

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
Copy link

aminbs commented Mar 6, 2023

Hello will this PR be merged?

@spacemunkay
Copy link

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
Copy link

Matt7983 commented Feb 29, 2024

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

@schlumpfit

Hello, could you merge this PR?

@schlumpfit schlumpfit closed this Aug 10, 2024
@schlumpfit schlumpfit reopened this Aug 10, 2024
@schlumpfit
Copy link
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