Sha256: b34e2f053df4407879f5a33be68ad46719356563d2688a676422a9c9f1976833

Contents?: true

Size: 259 Bytes

Versions: 4

Compression:

Stored size: 259 Bytes

Contents

module Hatchy
  class ProjectPolicy < ApplicationPolicy
    def create?
      owner_or_admin?
    end

    def update?
      create?
    end

    def send_to_analysis?
      create?
    end

    def publish?
      create? && record.approved?
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hatchy-0.0.8.pre app/policies/hatchy/project_policy.rb
hatchy-0.0.7.pre app/policies/hatchy/project_policy.rb
hatchy-0.0.6.pre app/policies/hatchy/project_policy.rb
hatchy-0.0.5.pre app/policies/hatchy/project_policy.rb