Sha256: b1b4936427d535b045cc6df1ed0e6ea8d831cc1fef0ccf5c39dea0546dedc276

Contents?: true

Size: 318 Bytes

Versions: 40

Compression:

Stored size: 318 Bytes

Contents

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

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

  def create?
    false
  end

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

  def destroy?
    false
  end
end

Version data entries

40 entries across 38 versions & 2 rubygems

Version Path
enju_library-0.3.11 app/policies/request_status_type_policy.rb
enju_library-0.3.10 app/policies/request_status_type_policy.rb
enju_library-0.3.9 app/policies/request_status_type_policy.rb
enju_library-0.3.8 app/policies/request_status_type_policy.rb
enju_library-0.3.8.rc.2 app/policies/request_status_type_policy.rb
enju_library-0.3.8.rc.1 app/policies/request_status_type_policy.rb
enju_library-0.4.0.rc.1 app/policies/request_status_type_policy.rb
enju_library-0.3.7 app/policies/request_status_type_policy.rb
enju_library-0.3.6 app/policies/request_status_type_policy.rb
enju_library-0.4.0.beta.4 app/policies/request_status_type_policy.rb
enju_library-0.4.0.beta.3 app/policies/request_status_type_policy.rb
enju_library-0.4.0.beta.2 app/policies/request_status_type_policy.rb
enju_library-0.4.0.beta.1 app/policies/request_status_type_policy.rb
enju_library-0.3.5 app/policies/request_status_type_policy.rb
enju_library-0.3.4 app/policies/request_status_type_policy.rb
enju_library-0.3.3 app/policies/request_status_type_policy.rb
enju_library-0.3.2 app/policies/request_status_type_policy.rb
enju_library-0.3.1 app/policies/request_status_type_policy.rb
enju_library-0.3.0 app/policies/request_status_type_policy.rb
enju_library-0.3.0.rc.1 app/policies/request_status_type_policy.rb