Sha256: f945413d261e501849bd1c7db48342dac7f2b1f1d591a9cc261501abb4b3f373
Contents?: true
Size: 501 Bytes
Versions: 5
Compression:
Stored size: 501 Bytes
Contents
class IshManager::Ability include ::CanCan::Ability def initialize user # # signed in user # unless user.blank? if user.profile && user.profile.manager? can :manage, :all end can [ :show ], Gallery do |gallery| gallery.user == user end end user ||= User.new can [ :read ], Gallery do |gallery| gallery.is_public end can [ :read ], Report do |report| report.is_public end end end
Version data entries
5 entries across 5 versions & 1 rubygems