Sha256: aadc441ade8631764f3ee738d9832df66b149acf5e5c7f19e7cc9fcdc514925f

Contents?: true

Size: 245 Bytes

Versions: 4

Compression:

Stored size: 245 Bytes

Contents

class Ability
  include CanCan::Ability

  def initialize(user)
    if user.super_admin?
      can :manage, :all
    else
      can :read, ActiveAdmin::Page, name: "Dashboard"
      can [:read, :show, :index], [Category, Post]
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
active_admin-state_machine-1.0.0.pre1 spec/dummy/app/models/ability.rb
active_admin-workflow-0.1.0 spec/dummy/app/models/ability.rb
active_admin-state_machine-0.1.1 spec/dummy/app/models/ability.rb
active_admin-state_machine-0.1.0 spec/dummy/app/models/ability.rb