Sha256: 7a2a693abe9ccef42087cc5b09241cc94ad04166e3cf789b8c8f5442b3b025f0

Contents?: true

Size: 370 Bytes

Versions: 8

Compression:

Stored size: 370 Bytes

Contents

# frozen_string_literal: true

class PagePolicy < Policy
  def index?
    true
  end

  def calendar?
    index?
  end

  def deleted?
    index?
  end

  def search?
    index?
  end

  def new?
    user.role?(:pages)
  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

8 entries across 8 versions & 1 rubygems

Version Path
pages_core-3.14.0 app/policies/page_policy.rb
pages_core-3.13.0 app/policies/page_policy.rb
pages_core-3.12.7 app/policies/page_policy.rb
pages_core-3.12.6 app/policies/page_policy.rb
pages_core-3.12.5 app/policies/page_policy.rb
pages_core-3.12.4 app/policies/page_policy.rb
pages_core-3.12.3 app/policies/page_policy.rb
pages_core-3.12.2 app/policies/page_policy.rb