Sha256: 9a4cdd15ba9cb345aeb6bf2ae553936037492bba5caac528968e8ad55430d30b

Contents?: true

Size: 349 Bytes

Versions: 29

Compression:

Stored size: 349 Bytes

Contents

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

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

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

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

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

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
enju_circulation-0.2.4 app/policies/user_checkout_stat_policy.rb
enju_circulation-0.2.3 app/policies/user_checkout_stat_policy.rb
enju_circulation-0.2.2 app/policies/user_checkout_stat_policy.rb
enju_circulation-0.2.1 app/policies/user_checkout_stat_policy.rb
enju_circulation-0.2.0 app/policies/user_checkout_stat_policy.rb
enju_circulation-0.2.0.beta.4 app/policies/user_checkout_stat_policy.rb
enju_circulation-0.2.0.beta.3 app/policies/user_checkout_stat_policy.rb
enju_circulation-0.2.0.beta.2 app/policies/user_checkout_stat_policy.rb
enju_circulation-0.2.0.beta.1 app/policies/user_checkout_stat_policy.rb