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-3.1.0 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.1.0.rc3 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.1.0.rc2 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.1.0.rc1 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.0.1 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.0.0 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.0.0.rc7 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.0.0.rc6 app/policies/locomotive/content_type_policy.rb
locomotivecms-3.0.0.rc5 app/policies/locomotive/content_type_policy.rb