Sha256: d1504f2a6ecaab54dc9be4e023a02587da1766ce16920ed28d5779ee1567d201
Contents?: true
Size: 547 Bytes
Versions: 23
Compression:
Stored size: 547 Bytes
Contents
require 'cancan' module RailsOps::AuthorizationBackend class CanCanCan < Abstract EXCEPTION_CLASS = 'CanCan::AccessDenied' def initialize unless defined?(CanCanCan) fail 'RailsOps is configured to use CanCanCan authorization'\ "backend, but the Gem 'cancancan' does not appear to be installed." end end def authorize!(operation, *args) ability = operation.context.try(:ability) || fail(RailsOps::Exceptions::AuthorizationNotPerformable) ability.authorize!(*args) end end end
Version data entries
23 entries across 23 versions & 1 rubygems