-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Following configuration method is not working, https://github.com/square/rails-auth/wiki/Rails-Usage#user-content-configapplicationrb.
It seems to me that the reason is a wrong variable name around https://github.com/square/rails-auth/blob/master/lib/rails/auth/config_builder.rb#L9:
def application(config, acl_file: Rails.root.join("config/acl.yml"), matchers: {})
config.x.rails_auth.acl = Rails::Auth::ACL.from_yaml(
File.read(acl_file.to_s),
matchers: matchers
)
config.middleware.use Rails::Auth::ACL::Middleware, acl: config.x.acl
end
Where I think that config.x.rails_auth.acl = Rails::Auth::ACL.from_yaml(... should be config.x.acl = Rails::Auth::ACL.from_yaml(... (without the rails_auth) as later you are doing config.middleware.use Rails::Auth::ACL::Middleware, acl: config.x.acl.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels