Sha256: 767f1307927bf648c3b3dfa5259c6f1cb73c2d0c48431abe693611eafd0c867b

Contents?: true

Size: 176 Bytes

Versions: 15

Compression:

Stored size: 176 Bytes

Contents

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

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
enju_ndl-0.3.3 app/policies/ndl_book_policy.rb
enju_ndl-0.3.2 app/policies/ndl_book_policy.rb
enju_ndl-0.4.0.rc.1 app/policies/ndl_book_policy.rb
enju_ndl-0.4.0.beta.1 app/policies/ndl_book_policy.rb
enju_ndl-0.3.1 app/policies/ndl_book_policy.rb
enju_ndl-0.3.0 app/policies/ndl_book_policy.rb
enju_ndl-0.3.0.rc.1 app/policies/ndl_book_policy.rb
enju_ndl-0.3.0.beta.1 app/policies/ndl_book_policy.rb
enju_ndl-0.2.3 app/policies/ndl_book_policy.rb
enju_ndl-0.2.2 app/policies/ndl_book_policy.rb
enju_ndl-0.2.1 app/policies/ndl_book_policy.rb
enju_ndl-0.2.0 app/policies/ndl_book_policy.rb
enju_ndl-0.2.0.beta.3 app/policies/ndl_book_policy.rb
enju_ndl-0.2.0.beta.2 app/policies/ndl_book_policy.rb
enju_ndl-0.2.0.beta.1 app/policies/ndl_book_policy.rb