Sha256: df163f0ca8d8eff71eb71b2e01675c7c061c77e06c233fee349245252cf13471

Contents?: true

Size: 276 Bytes

Versions: 19

Compression:

Stored size: 276 Bytes

Contents

class EventPolicy < ApplicationPolicy
  def index?
    true
  end

  def show?
    true
  end

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

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

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
enju_event-0.3.5 app/policies/event_policy.rb
enju_event-0.4.0.rc.1 app/policies/event_policy.rb
enju_event-0.3.4 app/policies/event_policy.rb
enju_event-0.3.3 app/policies/event_policy.rb
enju_event-0.4.0.beta.2 app/policies/event_policy.rb
enju_event-0.4.0.beta.1 app/policies/event_policy.rb
enju_event-0.3.2 app/policies/event_policy.rb
enju_event-0.3.1 app/policies/event_policy.rb
enju_event-0.3.0 app/policies/event_policy.rb
enju_event-0.3.0.rc.1 app/policies/event_policy.rb
enju_event-0.3.0.beta.1 app/policies/event_policy.rb
enju_event-0.2.3 app/policies/event_policy.rb
enju_event-0.2.2 app/policies/event_policy.rb
enju_event-0.2.1 app/policies/event_policy.rb
enju_event-0.2.0 app/policies/event_policy.rb
enju_event-0.2.0.beta.4 app/policies/event_policy.rb
enju_event-0.2.0.beta.3 app/policies/event_policy.rb
enju_event-0.2.0.beta.2 app/policies/event_policy.rb
enju_event-0.2.0.beta.1 app/policies/event_policy.rb