Skip to content

Commit

Permalink
andrewculver#186 fixes cancan integration presence control
Browse files Browse the repository at this point in the history
  • Loading branch information
eyupatis committed Feb 3, 2018
1 parent 7bc4946 commit a8582ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/koudoku/subscriptions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def load_subscription
@subscription = ::Subscription.where(ownership_attribute => current_owner.id).find_by_id(params[:id])

# also, if cancan methods are available, we should use that to authorize.
if defined?(:can?)
if respond_to?(:can?)
return unauthorized unless can? :manage, @subscription
end

Expand Down

0 comments on commit a8582ce

Please sign in to comment.