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