trabajo-afectivo/app/policies/exceptions_policy.rb

12 lines
460 B
Ruby
Raw Permalink Normal View History

2022-01-01 13:38:12 +00:00
# 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