Sha256: acde4eabbe933e10144f48ab0d7202fd1872276e59b444643c02c77d9c6d95ee
Contents?: true
Size: 535 Bytes
Versions: 21
Compression:
Stored size: 535 Bytes
Contents
module CanTango class Ability module MasqueradeHelpers def masquerade_user? return false if masquerading_off? candidate.respond_to?(:active_user) && masquerading? end def masquerading? candidate.respond_to?(:masquerading?) && candidate.masquerading? end def masquerade_account? return false if masquerading_off? candidate.respond_to?(:active_account) end def masquerading_off? options[:masquerade] == false end end end end
Version data entries
21 entries across 21 versions & 1 rubygems