Sha256: c37a6c839101321e46123c322247aeb5010894995a08f4f02c407c1df300e033

Contents?: true

Size: 418 Bytes

Versions: 29

Compression:

Stored size: 418 Bytes

Contents

module Locomotive
  class ContentTypePolicy < ApplicationPolicy

    def index?
      site_staff?
    end

    def create?
      site_admin_or_designer?
    end

    def update?
      site_admin_or_designer?
    end

    def destroy?
      site_admin_or_designer?
    end

    def destroy_all?
      site_admin_or_designer?
    end

    def show?
      site_admin_or_designer? || !@resource.hidden?
    end

  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
locomotivecms-4.0.3 app/policies/locomotive/content_type_policy.rb
locomotivecms-4.0.2 app/policies/locomotive/content_type_policy.rb
locomotivecms-4.0.1 app/policies/locomotive/content_type_policy.rb
locomotivecms-4.0.0 app/policies/locomotive/content_type_policy.rb
locomotivecms-4.0.0.rc0 app/policies/locomotive/content_type_policy.rb
locomotivecms-4.0.0.alpha3 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.4.1 app/policies/locomotive/content_type_policy.rb
locomotivecms-4.0.0.alpha2 app/policies/locomotive/content_type_policy.rb
locomotivecms-4.0.0.alpha1 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.4.0 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.3.0 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.3.0.rc3 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.3.0.rc2 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.1.2 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.2.1 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.3.0.rc1 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.2.0 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.2.0.rc2 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.2.0.rc1 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.1.1 app/policies/locomotive/content_type_policy.rb