20201027152258_add_missing_permissions.rb 570 B

1234567891011121314151617181920212223
  1. class AddMissingPermissions < ActiveRecord::Migration[5.2]
  2. def change
  3. # return if it's a new setup
  4. return if !Setting.exists?(name: 'system_init_done')
  5. Permission.create_if_not_exists(
  6. name: 'admin.channel_google',
  7. note: 'Manage %s',
  8. preferences: {
  9. translations: ['Channel - Google']
  10. },
  11. )
  12. Permission.create_if_not_exists(
  13. name: 'admin.channel_microsoft365',
  14. note: 'Manage %s',
  15. preferences: {
  16. translations: ['Channel - Microsoft 365']
  17. },
  18. )
  19. end
  20. end