Skip to content

Commit

Permalink
Merge pull request #13209 from kbrock/fix_auth_drb
Browse files Browse the repository at this point in the history
fix_auth: allow config tables to have drb models
(cherry picked from commit 64d9f44)

https://bugzilla.redhat.com/show_bug.cgi?id=1434158
  • Loading branch information
Fryguy authored and simaishi committed Mar 20, 2017
1 parent 9982a90 commit cd6646e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/fix_auth.rb
Expand Up @@ -13,6 +13,9 @@

require 'active_support/all'
require 'active_support/concern'
# this gets around a bug if a user mistakingly
# serializes a drb object into a configuration hash
require 'drb'
require_relative '../lib/vmdb/settings/walker'
require 'fix_auth/auth_model'
require 'fix_auth/auth_config_model'
Expand Down
4 changes: 4 additions & 0 deletions tools/fix_auth/auth_config_model.rb
Expand Up @@ -41,6 +41,10 @@ def recrypt(old_value, options = {})

symbol_keys ? hash.deep_symbolize_keys! : hash.deep_stringify_keys!
hash.to_yaml
rescue ArgumentError # undefined class/module
puts "potentially bad yaml:"
puts old_value
raise
end
end
end
Expand Down

0 comments on commit cd6646e

Please sign in to comment.