blob: adbc5fd89b694dc0f53977a8a670ebdd3bc4b576 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 | class VehicleJourneyPolicy < ApplicationPolicy
  class Scope < Scope
    def resolve
      scope
    end
  end
  def create?
    !referential_read_only? && organisation_match? && user.has_permission?('vehicle_journeys.create')
  end
  def destroy?
    !referential_read_only? && organisation_match? && user.has_permission?('vehicle_journeys.destroy')
  end
  def update?
    !referential_read_only? && organisation_match? && user.has_permission?('vehicle_journeys.update')
  end
end
 |