Sha256: df7d10c18742dba08351351ed669195054c1fb7e98c6388135fc4f2699e73cd8

Contents?: true

Size: 390 Bytes

Versions: 123

Compression:

Stored size: 390 Bytes

Contents

# frozen_string_literal: true

class Ability < ::EacRailsBase0::AppBase::Ability
  def initialize(user)
    super(user)
    user ||= ::EacUsersSupport::User.new
    for_all_permissions(user)
    logged_permissions(user) unless user.new_record?
  end

  private

  def for_all_permissions(_user)
    can :read, :welcome
  end

  def logged_permissions(_user)
    can :manage, :all
  end
end

Version data entries

123 entries across 123 versions & 2 rubygems

Version Path
eac_tools-0.86.8 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
avm-eac_rails_base0-0.11.1 template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.86.7 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.84.0 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.83.0 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.82.0 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.81.0 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
avm-eac_rails_base0-0.11.0 template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.80.0 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.79.0 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.78.0 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.77.1 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.77.0 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.76.1 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.76.0 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.75.2 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.75.1 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.75.0 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
avm-eac_rails_base0-0.10.3 template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
eac_tools-0.74.1 sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb