token_policy.rb 214 B

123456789
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class TokenPolicy < ApplicationPolicy
  3. def destroy?
  4. return false if !record.visible_in_frontend?
  5. record.user == user
  6. end
  7. end