20201027152258_add_missing_permissions.rb 647 B

12345678910111213141516171819202122232425
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class AddMissingPermissions < 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.create_if_not_exists(
  7. name: 'admin.channel_google',
  8. note: 'Manage %s',
  9. preferences: {
  10. translations: ['Channel - Google']
  11. },
  12. )
  13. Permission.create_if_not_exists(
  14. name: 'admin.channel_microsoft365',
  15. note: 'Manage %s',
  16. preferences: {
  17. translations: ['Channel - Microsoft 365']
  18. },
  19. )
  20. end
  21. end