20201005084847_agent_customer_permission.rb 438 B

1234567891011121314
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class AgentCustomerPermission < ActiveRecord::Migration[5.2]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. Permission.where(name: ['ticket.agent', 'ticket.customer', 'chat.agent', 'cti.agent']).each do |permission|
  7. permission.preferences.delete(:not)
  8. permission.save!
  9. end
  10. end
  11. end