trabajo-afectivo/app/policies/exceptions_policy.rb
2022-01-01 14:38:12 +01:00

11 lines
460 B
Ruby

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