Sha256: 4fcfbf9f256814b7a9dd336266d1586c9a990362e416c176420d79c7caeb5cac
Contents?: true
Size: 467 Bytes
Versions: 35
Compression:
Stored size: 467 Bytes
Contents
module RailsOps::AuthorizationBackend class CanCanCan < Abstract 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
35 entries across 35 versions & 1 rubygems