exceptions_policy.rb 460 B

1234567891011
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class ExceptionsPolicy < ApplicationPolicy
  3. # We want to avoid leaking of internal information but also want the user
  4. # to give the administrator a reference to find the cause of the error.
  5. # Therefore we generate a one time unique error ID that can be used to
  6. # search the logs and find the actual error message.
  7. def view_details?
  8. user&.permissions?('admin')
  9. end
  10. end