Sha256: 77872c9c6950ca1b03c108aa19c4b5daa4446033c916d31bf6a2ebe4aa60167f

Contents?: true

Size: 393 Bytes

Versions: 40

Compression:

Stored size: 393 Bytes

Contents

class SearchEnginePolicy < 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?, '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

40 entries across 38 versions & 2 rubygems

Version Path
enju_library-0.3.0.beta.2 app/policies/search_engine_policy.rb
enju_library-0.2.5 app/policies/search_engine_policy.rb
enju_library-0.2.4 app/policies/search_engine_policy.rb
enju_library-0.2.3 app/policies/search_engine_policy.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.2/app/policies/search_engine_policy.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/bundler/gems/enju_library-d36f415e177e/app/policies/search_engine_policy.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.1/app/policies/search_engine_policy.rb
enju_library-0.2.2 app/policies/search_engine_policy.rb
enju_library-0.2.1 app/policies/search_engine_policy.rb
enju_library-0.2.0 app/policies/search_engine_policy.rb
enju_library-0.2.0.beta.10 app/policies/search_engine_policy.rb
enju_library-0.2.0.beta.9 app/policies/search_engine_policy.rb
enju_library-0.2.0.beta.8 app/policies/search_engine_policy.rb
enju_library-0.2.0.beta.7 app/policies/search_engine_policy.rb
enju_library-0.2.0.beta.6 app/policies/search_engine_policy.rb
enju_library-0.2.0.beta.5 app/policies/search_engine_policy.rb
enju_library-0.2.0.beta.4 app/policies/search_engine_policy.rb
enju_library-0.2.0.beta.3 app/policies/search_engine_policy.rb
enju_library-0.2.0.beta.2 app/policies/search_engine_policy.rb
enju_library-0.2.0.beta.1 app/policies/search_engine_policy.rb