nathanl / authority

*CURRENTLY UNMAINTAINED*. Authority helps you authorize actions in your Rails app. It's ORM-neutral and has very little fancy syntax; just group your models under one or more Authorizer classes and write plain Ruby methods on them.
MIT License
1.21k stars 67 forks source link

Issue with rails 4.2.5.1 #108

Closed j15e closed 8 years ago

j15e commented 8 years ago

Just FYI and helping others with this problem, see rails/rails#23243.

As a temporary workaround I overwrite the method in my ApplicationController.

class ApplicationController < ActionController::Base

  private
  # This is overwritten to workaround an issue with render file: resolver.
  # @todo remove when rails fix is released
  # @see https://github.com/rails/rails/issues/23243
  def authority_forbidden(error)
    Authority.logger.warn(error.message)
    send_file(Rails.root.join('public', '403.html'),
              type: 'text/html; charset=utf-8',
              status: 403, disposition: 'inline')
  end
end
lorefnon commented 8 years ago

The relevant issue in Rails has been closed. So this workaround should not be required anymore.

nathanl commented 8 years ago

Sounds like this is resolved. Please reopen if not.