Sha256: e279441863a2693e7c90b00ff05f4128c9d9df34255b4d3181753181d61073aa

Contents?: true

Size: 219 Bytes

Versions: 4

Compression:

Stored size: 219 Bytes

Contents

class IshManager::Ability
  include ::CanCan::Ability

  def initialize user
    user ||= User.new

    if user.profile && user.profile.manager?
      can :manage, :all
    else
      can :read, :all
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ish_manager-0.1.3 app/models/ish_manager/ability.rb
ish_manager-0.1.2 app/models/ish_manager/ability.rb
ish_manager-0.1.1 app/models/ish_manager/ability.rb
ish_manager-0.1.0 app/models/ish_manager/ability.rb