Sha256: 4020a8bf5ca43aaeb67621a20680a977e9f6693ec99f0417ca9de9bdcde66e05
Contents?: true
Size: 571 Bytes
Versions: 10
Compression:
Stored size: 571 Bytes
Contents
module Locomotive class PagePolicy < ApplicationPolicy def index? site_staff? end def create? site_staff? end def update? site_staff? end def destroy? site_staff? && !@resource.index_or_not_found? end def permitted_attributes attributes = [:title, :layout_id, :slug, :parent_id, :listed, :published, :redirect, :redirect_url, :redirect_type, :seo_title, :meta_description, :meta_keywords, :cache_enabled] attributes += [:handle] if site_admin_or_designer? attributes end end end
Version data entries
10 entries across 10 versions & 1 rubygems