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