Sha256: d1111e6c612c890bdb396ace3f306c55f3ea56d2ecb703aaef1c8f3b492b4d3a

Contents?: true

Size: 314 Bytes

Versions: 18

Compression:

Stored size: 314 Bytes

Contents

class SubjectPolicy < 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/subject_policy.rb
enju_subject-0.3.3 app/policies/subject_policy.rb
enju_subject-0.4.0.rc.1 app/policies/subject_policy.rb
enju_subject-0.3.2 app/policies/subject_policy.rb
enju_subject-0.4.0.beta.1 app/policies/subject_policy.rb
enju_subject-0.3.1 app/policies/subject_policy.rb
enju_subject-0.3.0 app/policies/subject_policy.rb
enju_subject-0.3.0.rc.1 app/policies/subject_policy.rb
enju_subject-0.3.0.beta.1 app/policies/subject_policy.rb
enju_subject-0.2.3 app/policies/subject_policy.rb
enju_subject-0.2.2 app/policies/subject_policy.rb
enju_subject-0.2.1 app/policies/subject_policy.rb
enju_subject-0.2.0 app/policies/subject_policy.rb
enju_subject-0.2.0.beta.5 app/policies/subject_policy.rb
enju_subject-0.2.0.beta.4 app/policies/subject_policy.rb
enju_subject-0.2.0.beta.3 app/policies/subject_policy.rb
enju_subject-0.2.0.beta.2 app/policies/subject_policy.rb
enju_subject-0.2.0.beta.1 app/policies/subject_policy.rb