Sha256: 712c4765847dfe116349849231e357df692b89ca8ce9c6f43503c063386407b9

Contents?: true

Size: 215 Bytes

Versions: 71

Compression:

Stored size: 215 Bytes

Contents

class Ishapi::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

71 entries across 71 versions & 1 rubygems

Version Path
ishapi-0.1.8.73 app/models/ishapi/ability.rb~
ishapi-0.1.8.72 app/models/ishapi/ability.rb~
ishapi-0.1.8.71 app/models/ishapi/ability.rb~
ishapi-0.1.8.70 app/models/ishapi/ability.rb~
ishapi-0.1.8.69 app/models/ishapi/ability.rb~
ishapi-0.1.8.68 app/models/ishapi/ability.rb~
ishapi-0.1.8.67 app/models/ishapi/ability.rb~
ishapi-0.1.8.66 app/models/ishapi/ability.rb~
ishapi-0.1.8.65 app/models/ishapi/ability.rb~
ishapi-0.1.8.64 app/models/ishapi/ability.rb~
ishapi-0.1.8.63 app/models/ishapi/ability.rb~
ishapi-0.1.8.62 app/models/ishapi/ability.rb~
ishapi-0.1.8.61 app/models/ishapi/ability.rb~
ishapi-0.1.8.60 app/models/ishapi/ability.rb~
ishapi-0.1.8.59 app/models/ishapi/ability.rb~
ishapi-0.1.8.58 app/models/ishapi/ability.rb~
ishapi-0.1.8.57 app/models/ishapi/ability.rb~
ishapi-0.1.8.56 app/models/ishapi/ability.rb~
ishapi-0.1.8.55 app/models/ishapi/ability.rb~
ishapi-0.1.8.54 app/models/ishapi/ability.rb~