checks_user_attributes_by_current_user_permission.rb 362 B

12345678910111213
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module ChecksUserAttributesByCurrentUserPermission
  3. extend ActiveSupport::Concern
  4. private
  5. def check_attributes_by_current_user_permission(params)
  6. authorize!
  7. Service::User::FilterPermissionAssignments.new(current_user: current_user).execute(user_data: params)
  8. end
  9. end