Sha256: 6eb4d1ade841ad7bf48051077f9ce645e240a1f6c5da5115f8945e53f461c727

Contents?: true

Size: 472 Bytes

Versions: 9

Compression:

Stored size: 472 Bytes

Contents

module Locomotive
  class TranslationPolicy < ApplicationPolicy

    def index?
      site_staff?
    end

    def new?
      site_staff?
    end

    def edit?
      site_staff?
    end

    def create?
      site_staff? && !membership.visitor?
    end

    def update?
      site_staff? && !membership.visitor?
    end

    def destroy?
      site_staff? && !membership.visitor?
    end

    def destroy_all?
      site_staff? && !membership.visitor?
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/policies/locomotive/translation_policy.rb
locomotivecms-4.2.0.alpha1 app/policies/locomotive/translation_policy.rb
locomotivecms-4.1.1 app/policies/locomotive/translation_policy.rb
locomotivecms-4.1.0 app/policies/locomotive/translation_policy.rb
locomotivecms-4.1.0.rc1 app/policies/locomotive/translation_policy.rb
locomotivecms-4.0.3 app/policies/locomotive/translation_policy.rb
locomotivecms-4.0.2 app/policies/locomotive/translation_policy.rb
locomotivecms-4.0.1 app/policies/locomotive/translation_policy.rb
locomotivecms-4.0.0 app/policies/locomotive/translation_policy.rb