scope.rb 333 B

123456789101112
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Ticket::SharedDraftStartPolicy < ApplicationPolicy
  3. class Scope < ApplicationPolicy::Scope
  4. def resolve
  5. return scope.none if !user.permissions?('ticket.agent')
  6. scope.where group_id: user.group_ids_access('create')
  7. end
  8. end
  9. end