Sha256: 047890445c93a429ede29a60513e93ce71b80df17915b0c94c1196eca11df87b

Contents?: true

Size: 362 Bytes

Versions: 29

Compression:

Stored size: 362 Bytes

Contents

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

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

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

  def update?
    user.try(:has_role?, 'Administrator')
  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.3.11 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.10 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.9 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.4.0.rc.1 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.8 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.7 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.4.0.beta.4 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.4.0.beta.3 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.6 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.4.0.beta.2 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.4.0.beta.1 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.5 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.4 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.3 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.2 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.1 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.0 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.0.rc.1 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.3.0.beta.1 app/policies/item_has_use_restriction_policy.rb
enju_circulation-0.2.5 app/policies/item_has_use_restriction_policy.rb