Merge pull request #17 from finnlabs/feature/remove-current-user-patch

Remove code that patches the current_user setting.
pull/6827/head
sschu 11 years ago
commit 99bf27a4eb
  1. 9
      lib/report/controller.rb

@ -300,15 +300,6 @@ module Report::Controller
"(is_public = #{val ? report_engine.reporting_connection.quoted_true : report_engine.reporting_connection.quoted_false})" "(is_public = #{val ? report_engine.reporting_connection.quoted_true : report_engine.reporting_connection.quoted_false})"
end end
##
# Fallback: @current_user needs to be set for the engine
def current_user
if @current_user.nil?
raise NotImplementedError, "The #{self.class} should have set @current_user before this request"
end
@current_user
end
## ##
# Abstract: Implementation required in application # Abstract: Implementation required in application
def allowed_to?(action, subject, user = current_user) def allowed_to?(action, subject, user = current_user)

Loading…
Cancel
Save