Sha256: eb81c4c8d492b434f018f72d132724dfb4df12feff1be15981cc2b1e37668c38

Contents?: true

Size: 321 Bytes

Versions: 18

Compression:

Stored size: 321 Bytes

Contents

class ClassificationPolicy < ApplicationPolicy
  def index?
    true
  end

  def show?
    true
  end

  def create?
    true if user.try(:has_role?, 'Administrator')
  end

  def update?
    true if user.try(:has_role?, 'Administrator')
  end

  def destroy?
    true if user.try(:has_role?, 'Administrator')
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
enju_subject-0.3.4 app/policies/classification_policy.rb
enju_subject-0.3.3 app/policies/classification_policy.rb
enju_subject-0.4.0.rc.1 app/policies/classification_policy.rb
enju_subject-0.3.2 app/policies/classification_policy.rb
enju_subject-0.4.0.beta.1 app/policies/classification_policy.rb
enju_subject-0.3.1 app/policies/classification_policy.rb
enju_subject-0.3.0 app/policies/classification_policy.rb
enju_subject-0.3.0.rc.1 app/policies/classification_policy.rb
enju_subject-0.3.0.beta.1 app/policies/classification_policy.rb
enju_subject-0.2.3 app/policies/classification_policy.rb
enju_subject-0.2.2 app/policies/classification_policy.rb
enju_subject-0.2.1 app/policies/classification_policy.rb
enju_subject-0.2.0 app/policies/classification_policy.rb
enju_subject-0.2.0.beta.5 app/policies/classification_policy.rb
enju_subject-0.2.0.beta.4 app/policies/classification_policy.rb
enju_subject-0.2.0.beta.3 app/policies/classification_policy.rb
enju_subject-0.2.0.beta.2 app/policies/classification_policy.rb
enju_subject-0.2.0.beta.1 app/policies/classification_policy.rb