Sha256: bc32b1f2fc89476300a917d5a80de214236d81f47ce03c9a68255708c4d94b3d

Contents?: true

Size: 378 Bytes

Versions: 6

Compression:

Stored size: 378 Bytes

Contents

class OrderListPolicy < ApplicationPolicy
  def index?
    true if user.try(:has_role?, 'Librarian')
  end

  def show?
    true if user.try(:has_role?, 'Librarian')
  end

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

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
enju_purchase_request-0.3.2 app/policies/order_list_policy.rb
enju_purchase_request-0.3.1 app/policies/order_list_policy.rb
enju_purchase_request-0.3.0.beta.1 app/policies/order_list_policy.rb
enju_purchase_request-0.2.1 app/policies/order_list_policy.rb
enju_purchase_request-0.2.0 app/policies/order_list_policy.rb
enju_purchase_request-0.2.0.beta.2 app/policies/order_list_policy.rb