Sha256: 31bd8e512e11c07bd9865b27dabb0f14cc566eba3e9dfc81c8c2472af25e207b

Contents?: true

Size: 367 Bytes

Versions: 14

Compression:

Stored size: 367 Bytes

Contents

# frozen_string_literal: true

class PagePolicy < Policy
  def index?
    true
  end

  def news?
    true
  end

  def deleted?
    index?
  end

  def new?
    user.role?(:pages)
  end

  def new_news?
    create?
  end

  def show?
    true
  end

  def edit?
    user.role?(:pages)
  end

  def move?
    edit?
  end

  def delete_meta_image?
    edit?
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
pages_core-3.11.3 app/policies/page_policy.rb
pages_core-3.11.2 app/policies/page_policy.rb
pages_core-3.11.1 app/policies/page_policy.rb
pages_core-3.11.0 app/policies/page_policy.rb
pages_core-3.10.2 app/policies/page_policy.rb
pages_core-3.10.1 app/policies/page_policy.rb
pages_core-3.9.2 app/policies/page_policy.rb
pages_core-3.9.1 app/policies/page_policy.rb
pages_core-3.9.0 app/policies/page_policy.rb
pages_core-3.8.3 app/policies/page_policy.rb
pages_core-3.8.2 app/policies/page_policy.rb
pages_core-3.8.1 app/policies/page_policy.rb
pages_core-3.8.0 app/policies/page_policy.rb
pages_core-3.7.0 app/policies/page_policy.rb