Sha256: f36e74584a4a4a662ab7a040699b0a228318a4f9201a6b363b2dfb47a36c37a1

Contents?: true

Size: 399 Bytes

Versions: 1

Compression:

Stored size: 399 Bytes

Contents

class PagePolicy < Policy
  module Collection
    def index?
      true
    end

    def news?
      true
    end

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

    def new_news?
      create?
    end
  end

  module Member
    def show?
      true
    end

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

    def move?
      edit?
    end

    def delete_meta_image?
      edit?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pages_core-3.5.1 app/policies/page_policy.rb